php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40321 get_headers should lowercase array keys
Submitted: 2007-02-02 10:08 UTC Modified: 2016-01-15 14:28 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: elias at adaptiveinstance dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.0 OS: all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: elias at adaptiveinstance dot com
New email:
PHP Version: OS:

 

 [2007-02-02 10:08 UTC] 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);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-15 14:28 UTC] danack@php.net
-Status: Open +Status: Not a bug -Package: Feature/Change Request +Package: *General Issues
 [2016-01-15 14:28 UTC] danack@php.net
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.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 10:00:01 2026 UTC