#50451 [Asn->Csd]: http wrapper breaks on 2048 char long headers
ID: 50451
Updated by: jani@php.net
Reported By: sjoerd@php.net
-Status: Assigned
+Status: Closed
Bug Type: Streams related
Operating System: *
PHP Version: 5.*, 6
Assigned To: iliaa
Previous Comments:
------------------------------------------------------------------------
[2009-12-14 06:19:30] jani@php.net
Not merged yet to PHP_5_2.
------------------------------------------------------------------------
[2009-12-13 15:44:23] svn@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=292079
Log: Fixed bug #50451 (http wrapper breaks on 2048 char long headers)
# Improvement on the fix for bug #49851
------------------------------------------------------------------------
[2009-12-11 13:16:01] sjoerd@php.net
Description:
------------
If a HTTP response contains an header of exactly 2048 characters, the
remaining headers are not parsed and are returned in the output.
See also bug #49851.
Reproduce code:
---------------
<?php
echo file_get_contents('http://localhost/a.php');
?>
a.php:
<?php
header(str_pad('X-Padding: ', 2046, 'x'));
header('Location: http://www.google.nl/');
echo "Foo";
?>
Expected result:
----------------
The homepage of google.nl.
Actual result:
--------------
Location: http://www.google.nl/
Content-Length: 3
Connection: close
Content-Type: text/html
Foo
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50451&edit=1
Thread (5 messages)