PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Request » Bug #5910

getResponseHeader() method is case-sensitive

Details

Submitted2005-11-09 22:33 UTC
Fromgugglegum at gmail dot com
StatusBogus
PackageHTTP_Request
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-11-09 22:33 UTC] gugglegum at gmail dot com

Description:
------------
By RFC-2616 request header names is case-insensitive, so we should get needed header in any case.

Solution:

function getResponseHeader($headername = null)
{
if (!isset($headername)) {
return isset($this->_response->_headers)? $this->_response->_headers: array();
} else {
return isset($this->_response->_headers[strtolower($headername)]) ? $this->_response->_headers[strtolower($headername)] : false;
}
}