diff --git a/ktwebdav/lib/KTWebDAVServer.inc.php b/ktwebdav/lib/KTWebDAVServer.inc.php index 0139aa6..bba6072 100644 --- a/ktwebdav/lib/KTWebDAVServer.inc.php +++ b/ktwebdav/lib/KTWebDAVServer.inc.php @@ -346,26 +346,26 @@ class KTWebDAVServer extends HTTP_WebDAV_Server // are sent in the response without any message-body $method = 'get'; } - $this->ktwebdavLog("Entering $method request", 'info', true); - - if (method_exists($this, $wrapper) && ($method == 'options' || method_exists($this, $method))) { - $this->$wrapper(); // call method by name - } else { // method not found/implemented or needs to be ignored for now - if (($_SERVER['REQUEST_METHOD'] == 'LOCK') || ($_SERVER['REQUEST_METHOD'] == 'UNLOCK')) { - //$this->http_status('412 Precondition failed'); - // This is to get Finder to work for now. - $this->ktwebdavLog("Skipping $method request", 'info', true); - $this->http_status("200 OK") ; - } else { - $this->http_status('405 Method not allowed'); - header('Allow: '.join(', ', $this->_allow())); // tell client what's allowed - } - } - - $this->ktwebdavLog("Exiting $method request", 'info', true); + // stub out lock and unlock to get Finder working + if (($method == 'lock') || ($method == 'unlock')) { + $this->ktwebdavLog("Skipping $method request", 'info', true); + $this->http_status("200 OK"); + } else { + $this->ktwebdavLog("Entering $method request", 'info', true); - } + if (method_exists($this, $wrapper) && ($method == 'options' || method_exists($this, $method))) { + $this->$wrapper(); // call method by name + } else { // method not found/implemented + if ($_SERVER['REQUEST_METHOD'] == 'LOCK') { + $this->http_status('412 Precondition failed'); + } else { + $this->http_status('405 Method not allowed'); + header('Allow: '.join(', ', $this->_allow())); // tell client what's allowed + } + } +$this->ktwebdavLog("Exiting $method request", 'info', true); +} /** * check authentication if check is implemented