From:             
Operating system: Linux Debian Sid
PHP version:      5.4SVN-2011-08-01 (snap)
Package:          FPM related
Bug Type:         Bug
Bug description:Problem with headers longer than 4008 under FPM

Description:
------------
There is a problem when headers sent from a script are longer than 4008
(see the test sript below). I'm currently using FPM with nginx 1.0.5.

If headers are longer than 4008, this happens:
for 4008, everything is OK,
for 4009, no output is displayed,
for 4010+, HTTP error 502 is returned.

Similar problem has been verified under PHP 5.3.5 with different
boundaries:
4012 is OK,
4013 is OK, but with no output,
4014 gives 502.

Test script:
---------------
OK:

header(str_repeat('x', 4008));
echo 'foo';

--------------------------------
OK, but no output:

header(str_repeat('x', 4009));
echo 'foo';

--------------------------------
HTTP error 502:

header(str_repeat('x', 4010)); //or anything higher
echo 'foo';

--------------------------------
OK:

header(str_repeat('x', 2000));
header(str_repeat('y', 2006));
echo 'foo';
--------------------------------
OK, no output:

header(str_repeat('x', 2000));
header(str_repeat('y', 2007));
echo 'foo';
--------------------------------
502:

header(str_repeat('x', 2000));
header(str_repeat('y', 2008));
echo 'foo';

Expected result:
----------------
foo


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55341&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55341&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55341&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55341&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55341&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55341&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55341&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55341&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55341&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55341&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55341&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55341&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55341&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55341&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55341&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55341&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55341&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55341&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55341&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55341&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55341&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55341&r=mysqlcfg

Reply via email to