Req #40321 [Opn->Nab]: get_headers should lowercase array keys
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)