From: [email protected]
Operating system: Irrelevant
PHP version: 5.3SVN-2009-12-11 (SVN)
PHP Bug Type: Streams related
Bug description: http wrapper breaks on 2048 char long headers
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 bug report at http://bugs.php.net/?id=50451&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50451&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50451&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50451&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50451&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50451&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50451&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50451&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50451&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50451&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50451&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50451&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50451&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50451&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50451&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50451&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50451&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50451&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50451&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50451&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50451&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50451&r=mysqlcfg