* Fixed bug which caused GZIP encoded archives to be decoded
authorMichael Wallner <mike@php.net>
Tue, 6 Dec 2005 14:00:43 +0000 (14:00 +0000)
committerMichael Wallner <mike@php.net>
Tue, 6 Dec 2005 14:00:43 +0000 (14:00 +0000)
http_message_api.c
package2.xml

index b59dace58b583f3583cd712bcac5a377fdf54c91..d9b33d1eac8334ee72e6d63513b32f71367d4ce5 100644 (file)
@@ -224,7 +224,7 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
                
 #if defined(HTTP_HAVE_ZLIB) || defined(HAVE_ZLIB)
                /* check for compressed data */
-               if ((c = http_message_header(msg, "Content-Encoding"))) {
+               if (http_message_header(msg, "Vary") && (c = http_message_header(msg, "Content-Encoding"))) {
                        char *decoded = NULL;
                        size_t decoded_len = 0;
 #      if defined(HAVE_ZLIB) && !defined(HTTP_HAVE_ZLIB)
index 93e0a1a8a73d67b3413cd18ccf1e388fa66836f9..b96365483ff2476d5beb2e3b8b4f1c21ed60a4b4 100644 (file)
@@ -43,6 +43,8 @@ HttpUtil, HttpMessage, HttpRequest, HttpRequestPool; HttpResponse (PHP-5.1)
  <license>BSD, revised</license>
  <notes><![CDATA[
 + Added 'bodyonly' request option
+
+* Fixed bug which caused GZIP encoded archives to be decoded
 ]]></notes>
  <contents>
   <dir name="/">