Home » HTTP » HTTP_WebDAV_Server » Bug #3722
Permission denied not reported for PUT
Details
| Submitted | 2005-03-06 13:06 UTC |
|---|---|
| From | steve at nexusuk dot org |
| Assigned | hholzgra |
| Status | Closed |
| Package | HTTP_WebDAV_Server |
| PHP Version | 4.3.8 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-03-06 13:06 UTC] steve at nexusuk dot org
Description:
------------
Using HTTP_WebDAV_Server-0.99.1, failing to create a file when doing PUT (e.g. permissions error) doesn't return an error to the client. This can be resolved by modifying Server.php at line 1117 and adding an else part to return an error, as follows (http_PUT() function).
--- Original ---
$stat = $options["new"] ? "201 Created" : "204 No Content";
}
$this->http_status($stat);
--- Replace with ---
$stat = $options["new"] ? "201 Created" : "204 No Content";
} else $stat = "403 Forbidden";
$this->http_status($stat);
------------------
It also doesn't appear to catch an error returned by the fwrite() statements in the same function, which would cause the PUT to fail but still return a success if the server ran out of disk space, etc.
Expected result:
----------------
Server return error if PUT fails
Actual result:
--------------
Server does not return error if PUT fails