#50451 [Asn->Csd]: http wrapper breaks on 2048 char long headers

From: Date: Mon, 21 Dec 2009 10:11:42 +0000
Subject: #50451 [Asn->Csd]: http wrapper breaks on 2048 char long headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145951@lists.php.net to get a copy of this message
 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)

« previous php.bugs (#145951) next »