mirror of
https://github.com/php/php-src.git
synced 2024-09-28 21:36:12 +00:00
1f191e4d2b
disabled when the header "Content-length" is set. #One could argue that any output handler could change the size of the #response, so this exception for zlib.output_compression is an #inconsistency. However, zlib.output_compression is presented as a #performance setting, whose value should have no effect on the #correctness of the scripts. This was not the case. Setting the #header "content-length" and enabling zlib.output_compression was #a recipe for infringing section 4.4 of RFC 2616.
18 lines
561 B
PHP
18 lines
561 B
PHP
--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
|