aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/Sabre/DAV/Server.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/Sabre/DAV/Server.php')
-rw-r--r--vendor/sabre/dav/lib/Sabre/DAV/Server.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Server.php b/vendor/sabre/dav/lib/Sabre/DAV/Server.php
index 4aa6cacd4..e0a68ab50 100644
--- a/vendor/sabre/dav/lib/Sabre/DAV/Server.php
+++ b/vendor/sabre/dav/lib/Sabre/DAV/Server.php
@@ -8,7 +8,7 @@ use Sabre\HTTP;
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
- * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ * @license http://sabre.io/license/ Modified BSD License
*/
class Server {
@@ -684,6 +684,9 @@ class Server {
*/
protected function httpDelete($uri) {
+ // Checking If-None-Match and related headers.
+ if (!$this->checkPreconditions()) return;
+
if (!$this->broadcastEvent('beforeUnbind',array($uri))) return;
$this->tree->delete($uri);
$this->broadcastEvent('afterUnbind',array($uri));
@@ -871,13 +874,13 @@ class Server {
}
+ // Checking If-None-Match and related headers.
+ if (!$this->checkPreconditions()) return;
+
if ($this->tree->nodeExists($uri)) {
$node = $this->tree->getNodeForPath($uri);
- // Checking If-None-Match and related headers.
- if (!$this->checkPreconditions()) return;
-
// If the node is a collection, we'll deny it
if (!($node instanceof IFile)) throw new Exception\Conflict('PUT is not allowed on non-files.');
if (!$this->broadcastEvent('beforeWriteContent',array($uri, $node, &$body))) return false;