]> granicus.if.org Git - php/commitdiff
- Reversed implementation of FR #44164, pending further consideration.
authorGustavo André dos Santos Lopes <cataphract@php.net>
Thu, 18 Nov 2010 04:09:02 +0000 (04:09 +0000)
committerGustavo André dos Santos Lopes <cataphract@php.net>
Thu, 18 Nov 2010 04:09:02 +0000 (04:09 +0000)
  See rev #304903.

NEWS
main/SAPI.c
tests/basic/req44164.phpt [deleted file]

diff --git a/NEWS b/NEWS
index 72680d963b43e9127867e3f532b4593675f1e1d5..bd2ac98bb742c32367952d7b23192f5d8ad78d0f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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)
index 4a1605b0c51e6e36771c04e73442633499a4ea65..ca962b99707b4114fd457c48919b9f4b0efb5b31 100644 (file)
@@ -657,14 +657,6 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
                                }
                                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) &&
diff --git a/tests/basic/req44164.phpt b/tests/basic/req44164.phpt
deleted file mode 100644 (file)
index d008286..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--\r
-Req #44164 (Handle "Content-Length" HTTP header when zlib.output_compression active)\r
---SKIPIF--\r
-<?php\r
-if (!function_exists('gzdeflate'))\r
-    die("skip zlib extension required");\r
-?>\r
---INI--\r
-zlib.output_compression=On\r
---ENV--\r
-HTTP_ACCEPT_ENCODING=gzip\r
---FILE--\r
-<?php\r
-header("Content-length: 200");\r
-echo str_repeat("a", 200);\r
---EXPECT--\r
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r