Req #78844 [Opn]: Ability to get all client sent HTTP headers
Edit report at https://bugs.php.net/bug.php?id=78844&edit=1
ID: 78844
User updated by: mikk150 at gmail dot com
Reported by: mikk150 at gmail dot com
-Summary: Ability to get all client headers
+Summary: Ability to get all client sent HTTP headers
Status: Open
Type: Feature/Change Request
Package: *Web Server problem
Operating System: Linux
PHP Version: 7.3.11
Block user comment: N
Private report: N
New Comment:
summary more understandable
Previous Comments:
------------------------------------------------------------------------
[2019-11-20 17:39:23] mikk150 at gmail dot com
Description:
------------
PHP $_SERVER['HTTP_*'] superglobal and getallheaders() does not actually give all headers.
If you have multiple header lines with same name, each SAPI does totally different thing(and all of
them are wrong)
If I make request:
GET / HTTP/1.1
Forwarded: for=10.0.0.1,for=20.30.40.50;host=php.net,host=awesome.proxy.com;proto=https,proto=http
Forwarded: for=10.30.20.10;host=second.awesome.proxy.com;proto=http
I get 3 different responses based on SAPI
FPM only keeps last header
php -s only keeps first header
apache concatenates them with ,
PHP should implement new method to get all headers OR implement some class that has method to get
all headers
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78844&edit=1
Thread (5 messages)