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

git version control git at videolan.org
Thu Jan 14 18:06:23 CET 2010


vlc-1.0-bugfix | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 14 18:53:22 2010 +0200| [09b364adaa692e7a79638d0e25e3de5116781122] | 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.
(cherry picked from commit aceca996f66ad1269633fa38371c8f11d82f12a9)

> http://git.videolan.org/gitweb.cgi/vlc-1.0-bugfix.git/?a=commit;h=09b364adaa692e7a79638d0e25e3de5116781122
---

 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 94f36a5..da8d808 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -1394,12 +1394,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