cataphract                               Thu, 18 Nov 2010 04:09:02 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=305481

Log:
- Reversed implementation of FR #44164, pending further consideration.
  See rev #304903.

Bugs: http://bugs.php.net/44164 (Assigned) Handle "Content-Length" HTTP header 
when zlib.output_compression active
      http://bugs.php.net/304903 (error getting bug information)
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/main/SAPI.c
    D   php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-11-18 02:58:05 UTC (rev 305480)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-11-18 04:09:02 UTC (rev 305481)
@@ -32,8 +32,6 @@
   for empty uploads and, in debug mode, 0-length uploads. (Gustavo)
 - Added a 3rd parameter to get_html_translation_table. It now takes a charset
   hint, like htmlentities et al. (Gustavo)
-- Implemented FR #44164, setting the header "Content-length" implicitly
-  disables zlib.output_compression.

 - Fixed a possible double free in imap extension (Identified by Mateusz
   Kocielski). (CVE-2010-4150). (Ilia)

Modified: php/php-src/branches/PHP_5_3/main/SAPI.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/SAPI.c    2010-11-18 02:58:05 UTC (rev 
305480)
+++ php/php-src/branches/PHP_5_3/main/SAPI.c    2010-11-18 04:09:02 UTC (rev 
305481)
@@ -657,14 +657,6 @@
                                }
                                efree(mimetype);
                                SG(sapi_headers).send_default_content_type = 0;
-                       } else if (!STRCASECMP(header_line, "Content-Length")) {
-                               /* Script is setting Content-length. The script 
cannot reasonably
-                                * know the size of the message body after 
compression, so it's best
-                                * do disable compression altogether. This 
contributes to making scripts
-                                * portable between setups that have and don't 
have zlib compression
-                                * enabled globally. See req #44164 */
-                               zend_alter_ini_entry("zlib.output_compression", 
sizeof("zlib.output_compression"),
-                                       "0", sizeof("0") - 1, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
                        } else if (!STRCASECMP(header_line, "Location")) {
                                if ((SG(sapi_headers).http_response_code < 300 
||
                                        SG(sapi_headers).http_response_code > 
307) &&

Deleted: php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt      2010-11-18 
02:58:05 UTC (rev 305480)
+++ php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt      2010-11-18 
04:09:02 UTC (rev 305481)
@@ -1,17 +0,0 @@
---TEST--
-Req #44164 (Handle "Content-Length" HTTP header when zlib.output_compression 
active)
---SKIPIF--
-<?php
-if (!function_exists('gzdeflate'))
-    die("skip zlib extension required");
-?>
---INI--
-zlib.output_compression=On
---ENV--
-HTTP_ACCEPT_ENCODING=gzip
---FILE--
-<?php
-header("Content-length: 200");
-echo str_repeat("a", 200);
---EXPECT--
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to