ZF-2229: ZCResponse::getHeader() should be case-insensitive


Zend_Controller_Response_Abstract::getHeader() is case-sensitive whereas it is stated in the http rfc that header field names are case insensitive.

the two following call should return the same:

$response->getHeader('Content-Type'); $response->getHeader('content-type);

see… for reference


"Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive."


There is now such method as Zend_Controller_Response_Abstract::getHeader() in the current code base. Shouldn't this issue be closed?

There isn't a getHeader() method, but there should likely be. The bigger issue is that the internal storage is case sensitive, and likely shouldn't be. As it stands currently, when calling setHeader() and asking to overwrite, if the case of the header name differs, a new header will be created and sent.

Scheduling for 1.0.4

Fixed in both trunk and release-1.0 branch.