Req #17545 [Ana->Csd]: getallheaders - changed to return text of headers

From: Date: Mon, 23 Oct 2017 00:36:43 +0000
Subject: Req #17545 [Ana->Csd]: getallheaders - changed to return text of headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211837@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=17545&edit=1

 ID:                 17545
 Updated by:         kalle@php.net
 Reported by:        php at it-solutions dot org
 Summary:            getallheaders - changed to return text of headers
-Status:             Analyzed
+Status:             Closed
 Type:               Feature/Change Request
 Package:            HTTP related
 PHP Version:        *
-Assigned To:        
+Assigned To:        kalle
 Block user comment: N
 Private report:     N

 New Comment:

Like Rasmus noted some ages ago, there is no clean way to provide this information, however if a
patch comes up that can unify this, I'm sure it can find its way to the core


Previous Comments:
------------------------------------------------------------------------
[2002-06-01 10:42:41] rasmus@php.net

This is web-server dependant, and at least with Apache there is no clean way to get this
information.

------------------------------------------------------------------------
[2002-06-01 10:36:35] php at it-solutions dot org

Ok - as I understand it - getallheaders returns the headers in an associative array - however if the
headers are not formed properly (such as those where a return type is not specified) it isn't
always possible to break them down into an array. It would be nice to be able to retrieve the
headers in a 'raw' format so that the programmer could then parse and analyze them
himself.

Ben

------------------------------------------------------------------------
[2002-06-01 02:17:43] edink@php.net

What exactly cannot be accomplished with getallheaders() as it is now? 

------------------------------------------------------------------------
[2002-05-31 12:49:48] php at it-solutions dot org

Firstly I love PHP,
Secondly there isn't much it can't do that I want to do
But...

It would be nice if it could do everything that ASP can do (or everything that is possible - given
that it shouldn't have to do Microsoft BS)

In particular in ASP you can get the Raw request header (using a function called Request.BinaryRead)


I have not been able to find a way of doing this in PHP. Indeed I got quite hopeful when I found the
getallheaders function - but this turned out to return another associative array. 

Please can we have just the raw text - for cases when poorly written responders don't output
correctly.

Thanks again

Ben

------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=17545&edit=1


Thread (5 messages)

« previous php.bugs (#211837) next »