[vlc-devel] commit: HTTP: zlib only supports deflate and gzip ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Jan 14 17:56:39 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 14 18:53:22 2010 +0200| [aceca996f66ad1269633fa38371c8f11d82f12a9] | committer: Rémi Denis-Courmont 

HTTP: zlib only supports deflate and gzip

Don't try to handle other codings with it. As of today, IANA lists
compress, exi and pack200-gzip as other legal values.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aceca996f66ad1269633fa38371c8f11d82f12a9
---

 modules/access/http.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index 13fa693..f6422af 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -1477,12 +1477,14 @@ static int Request( access_t *p_access, int64_t i_tell )
         else if( !strcasecmp( psz, "Content-Encoding" ) )
         {
             msg_Dbg( p_access, "Content-Encoding: %s", p );
-            if( strcasecmp( p, "identity" ) )
+            if( !strcasecmp( p, "identity" ) )
+                ;
 #ifdef HAVE_ZLIB_H
+            else if( !strcasecmp( p, "gzip" ) || !strcasecmp( p, "deflate" ) )
                 p_sys->b_compressed = true;
-#else
-                msg_Warn( p_access, "Compressed content not supported. Rebuild with zlib support." );
 #endif
+            else
+                msg_Warn( p_access, "Unknown content coding: %s", p );
         }
         else if( !strcasecmp( psz, "Pragma" ) )
         {




More information about the vlc-devel mailing list