Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.10.4
-
Fix Version/s: None
-
Component/s: Zend_Controller
-
Labels:None
Description
When using Apache's ErrorDocument 404 to bootstrap an application the response code will default to 404 unless a header (any header) is explicitly set by PHP.
Zend_Controller_Response_Abstract::sendHeaders() first code block checks whether any headers were actually set or if $this->_httpResponseCode is not the default of 200. Usually neither apply and the method will just return without setting any headers.
Because Apache was using ErrorDocument 404 to handle the request, and PHP didn't set anything, Apache will now return a 404 header, with the regular, proper ZF application response in the body.