Req #78844 [NEW]: Ability to get all client headers

From: Date: Wed, 20 Nov 2019 17:39:23 +0000
Subject: Req #78844 [NEW]: Ability to get all client headers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223816@lists.php.net to get a copy of this message
From:             mikk150 at gmail dot com
Operating system: Linux
PHP version:      7.3.11
Package:          *Web Server problem
Bug Type:         Feature/Change Request
Bug description:Ability to get all client headers

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 bug report at https://bugs.php.net/bug.php?id=78844&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=78844&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=78844&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=78844&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=78844&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=78844&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=78844&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=78844&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=78844&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=78844&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=78844&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78844&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=78844&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=78844&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=78844&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=78844&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=78844&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=78844&r=mysqlcfg


Thread (5 messages)

« previous php.bugs (#223816) next »