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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Wed Oct 07 04:00:01 2026 UTC