From: regis dot leroy at makina-corpus dot com
Operating system: Linux Debian
PHP version: 5.2.6
PHP Bug Type: Apache2 related
Bug description: Apache env variables changed by PHP IN Apache
Description:
------------
reopening Bug #39927 and Bug #13961 which seems to have been marked Bogus
because of a Bogus reviewer.
Apache Env set by, for example:
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
Is treaten in PHP to become downgrade-1_0 with an "_". that's OK, its' for
security reasons.
But it is changed in Apache, and so Apache will not modify the response to
make his 'forced downgrade to HTTP/1.0'.
That's REALLY BAAAD.
This breaks Apache mechanism to handle bad browser which do not understand
well HTTP/1.1 (with chunked responses on bad Java soap parses for
exemple).
I reedit the bug to give a workaround for people interested:
in PHP write such things:
"""
if ($_SERVER['downgrade-1_0']){
apache_setenv('downgrade-1.0','true');
}
"""
Beware of safe mode allowed env vars if you're in safe mode.
Now you have to right behaviour $_SERVER contains only strings without
dots but Apache have the right env to behave well.
Shame on PHP....
Reproduce code:
---------------
see previous bugs
Expected result:
----------------
response in HTTP/1.0
Actual result:
--------------
response in HTTP/1.1
--
Edit bug report at http://bugs.php.net/?id=45947&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45947&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45947&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45947&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45947&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45947&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45947&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45947&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45947&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45947&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45947&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45947&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45947&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45947&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45947&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45947&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45947&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45947&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45947&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45947&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45947&r=mysqlcfg