#45794 [Opn->Bgs]: HTTP headers rendered differently in PHP than Apache rewrite mod likes them
| From: | lbarnaud@php.net | Date: | Tue, 12 Aug 2008 13:32:23 +0000 |
| Subject: | #45794 [Opn->Bgs]: HTTP headers rendered differently in PHP than Apache rewrite mod likes them | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127935@lists.php.net to get a copy of this message | ||
ID: 45794
Updated by: lbarnaud@php.net
Reported By: tarag956 at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: *Web Server problem
Operating System: nix
PHP Version: 5.2.6
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
HTTP headers and other variables follows the CGI specification:
http://hoohoo.ncsa.uiuc.edu/cgi/env.html
Previous Comments:
------------------------------------------------------------------------
[2008-08-12 06:08:40] tarag956 at gmail dot com
Description:
------------
HTTP headers rendered differently in PHP than Apache rewrite mod likes
them
For instance...
PHP renders a header this way (from the $_SERVER associated array):
HTTP_X_MOZ
But apache rewrite mod likes it:
HTTP:X-MOZ
I couldn't find any previous reports on this. But basically, PHP needs
some way for its HTTP headers to end up looking the same way that
Apache's mod-rewrite likes them.
Other examples...
Apache likes them like:
HTTP:X-FORWARDED-FOR
REMOTE_ADDR
HTTP:CLIENT-IP
REQUEST_METHOD
But PHP usually converts all "-" to "_" and converts all ":" to
"_" and
sometimes adds "HTTP_" in front of things.
Maybe this is a feature request, but it would be nice if PHP's HTTP
header variables could go be the exact names that HTTP's rewrite mod
like them as.
Reproduce code:
---------------
..
Expected result:
----------------
..
Actual result:
--------------
..
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45794&edit=1