Home » HTTP » HTTP_WebDAV_Server » Bug #6852
404 errors ignored for GET request
Details
| Submitted | 2006-02-21 15:25 UTC |
|---|---|
| From | pear dot php dot net at chsc dot dk |
| Assigned | hholzgra |
| Status | Closed |
| Package | HTTP_WebDAV_Server |
| PHP Version | 5.0.5 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-02-21 15:25 UTC] pear dot php dot net at chsc dot dk
Description:
------------
The end of http_GET() looks like this:
if (!headers_sent()) {
if (false === $status) {
$this->http_status("404 not found");
}
// TODO: check setting of headers in various code pathes above
$this->http_status("$status");
}
If $status is false, http_status() is called twice, first $this->http_status("404 not found") and then $this->http_status(""). The second call removes the 404 response code that was set, i.e. 404 errors are ignored.
A fix is to move the second http_status() into an else part of the if-statement.