Req #40321 [Opn->Nab]: get_headers should lowercase array keys

From: Date: Fri, 15 Jan 2016 14:28:23 +0000
Subject: Req #40321 [Opn->Nab]: get_headers should lowercase array keys
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198684@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=40321&edit=1

 ID:                 40321
 Updated by:         danack@php.net
 Reported by:        elias at adaptiveinstance dot com
 Summary:            get_headers should lowercase array keys
-Status:             Open
+Status:             Not a bug
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   all
 PHP Version:        5.2.0
 Block user comment: N
 Private report:     N

 New Comment:

Although the headers are interpreted without reference to case, get_headers doesn't do any
interpreting. It is only retrieving data, and mangling that data is not a good thing to do.

If you want the data to be all lower case, you can easily do that yourself.


Previous Comments:
------------------------------------------------------------------------
[2007-02-02 10:08:10] elias at adaptiveinstance dot com

Description:
------------
http header keys are defined case insensetive in rfc2616, therefore get_headers should lower or
uppercase all keys.
for BC an additional parameter may be useful:

get_headers($url, $format, $toLower = false);



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



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


Thread (2 messages)

« previous php.bugs (#198684) next »