HTTP: zlib only supports deflate and gzip
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 14 Jan 2010 16:53:22 +0000 (18:53 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 14 Jan 2010 16:53:22 +0000 (18:53 +0200)
Don't try to handle other codings with it. As of today, IANA lists
compress, exi and pack200-gzip as other legal values.

modules/access/http.c

index 13fa693..f6422af 100644 (file)
@@ -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" ) )
         {