work around webdrive bug while deleting folders: pretend we didnt see it, as webdrive does not handle the depth parameter correctly while deleting collections

This commit is contained in:
Klaus Leithoff 2009-10-12 14:40:37 +00:00
parent 09da0383bc
commit 72d662d3c3

View File

@ -1381,10 +1381,17 @@ class HTTP_WebDAV_Server
// check RFC 2518 Section 9.2, last paragraph // check RFC 2518 Section 9.2, last paragraph
if (isset($this->_SERVER["HTTP_DEPTH"])) { if (isset($this->_SERVER["HTTP_DEPTH"])) {
if ($this->_SERVER["HTTP_DEPTH"] != "infinity") { if ($this->_SERVER["HTTP_DEPTH"] != "infinity") {
if (stripos($_SERVER['HTTP_USER_AGENT'],'webdrive') !== false)
{
// pretend we didnt see it, as webdrive does not handle the depth parameter correctly while deleting collections
}
else
{
$this->http_status("400 Bad Request"); $this->http_status("400 Bad Request");
return; return;
} }
} }
}
// check lock status // check lock status
if ($this->_check_lock_status($this->path)) { if ($this->_check_lock_status($this->path)) {