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_WebDAV_Server » Bug #6852

404 errors ignored for GET request

Details

Submitted2006-02-21 15:25 UTC
Frompear dot php dot net at chsc dot dk
Assignedhholzgra
StatusClosed
PackageHTTP_WebDAV_Server
PHP Version5.0.5
OSLinux
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.