From: sjoerd-php at linuxonly dot nl Operating system: Linux 2.6.28 Ubuntu 9.0.4 PHP version: 5.3SVN-2009-10-12 (SVN) PHP Bug Type: HTTP related Bug description: HTTP breaks on long header line
Description: ------------ If a HTTP response contains an header of exactly 1024 characters, the remaining headers are not parsed and are returned in the output. Reproduce code: --------------- <?php echo file_get_contents('http://localhost/a.php'); ?> a.php: <?php header(str_pad('X-Padding: ', 1022, 'x')); header('Location: http://www.google.nl/'); echo "Foo"; ?> Expected result: ---------------- The homepage of google.nl. Actual result: -------------- Location: http://www.google.nl Vary: Accept-Encoding Content-Length: 3 Connection: close Content-Type: text/html Foo -- Edit bug report at http://bugs.php.net/?id=49851&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49851&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49851&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49851&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49851&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49851&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49851&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49851&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49851&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49851&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49851&r=support Expected behavior: http://bugs.php.net/fix.php?id=49851&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49851&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49851&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49851&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49851&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49851&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49851&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49851&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49851&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49851&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49851&r=mysqlcfg