aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-03-07 15:53:16 +0100
committerDaniel Lange <DLange@git.local>2016-03-07 15:53:16 +0100
commit50569114acdc64e7c7cae1498635d3f821517c30 (patch)
tree13d6fe76af33134fbfb2286930fb6603047f9299 /calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception
parentc210d30de6c62e7f7867bb32651349ddf455d9e6 (diff)
downloadroundcube_calendar-50569114acdc64e7c7cae1498635d3f821517c30.tar.gz
roundcube_calendar-50569114acdc64e7c7cae1498635d3f821517c30.tar.bz2
roundcube_calendar-50569114acdc64e7c7cae1498635d3f821517c30.zip
Initial commit of the Faster IT roundcube_calendar plugin distribution
This includes: * Kolab plugins 3.2.9 (calendar and libcalendaring) * CalDAV driver 3.2.8 * .htaccess files for at least some security * SabreDAV updated to 1.8.12 (Jan 2015 release) * Support for CURLOPT_SSL_* settings to allow self-signed certificates * Small fixes & improved documentation
Diffstat (limited to 'calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception')
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/BadRequest.php28
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Conflict.php28
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ConflictingLock.php37
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/FileNotFound.php19
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Forbidden.php27
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InsufficientStorage.php27
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InvalidResourceType.php33
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LengthRequired.php30
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LockTokenMatchesRequestUri.php41
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Locked.php73
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/MethodNotAllowed.php45
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotAuthenticated.php30
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotFound.php28
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotImplemented.php27
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PaymentRequired.php30
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PreconditionFailed.php71
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ReportNotSupported.php32
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/RequestedRangeNotSatisfiable.php31
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ServiceUnavailable.php30
-rw-r--r--calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/UnsupportedMediaType.php28
20 files changed, 695 insertions, 0 deletions
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/BadRequest.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/BadRequest.php
new file mode 100644
index 0000000..aeb6350
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/BadRequest.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * BadRequest
+ *
+ * The BadRequest is thrown when the user submitted an invalid HTTP request
+ * BadRequest
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class BadRequest extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 400;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Conflict.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Conflict.php
new file mode 100644
index 0000000..97ef2cd
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Conflict.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * Conflict
+ *
+ * A 409 Conflict is thrown when a user tried to make a directory over an existing
+ * file or in a parent directory that doesn't exist.
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class Conflict extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 409;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ConflictingLock.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ConflictingLock.php
new file mode 100644
index 0000000..33839d3
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ConflictingLock.php
@@ -0,0 +1,37 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * ConflictingLock
+ *
+ * Similar to the Locked exception, this exception thrown when a LOCK request
+ * was made, on a resource which was already locked
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class ConflictingLock extends Locked {
+
+ /**
+ * This method allows the exception to include additional information into the WebDAV error response
+ *
+ * @param DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(DAV\Server $server, \DOMElement $errorNode) {
+
+ if ($this->lock) {
+ $error = $errorNode->ownerDocument->createElementNS('DAV:','d:no-conflicting-lock');
+ $errorNode->appendChild($error);
+ if (!is_object($this->lock)) var_dump($this->lock);
+ $error->appendChild($errorNode->ownerDocument->createElementNS('DAV:','d:href',$this->lock->uri));
+ }
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/FileNotFound.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/FileNotFound.php
new file mode 100644
index 0000000..f35f9b3
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/FileNotFound.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * FileNotFound
+ *
+ * Deprecated: Warning, this class is deprecated and will be removed in a
+ * future version of SabreDAV. Please use OldSabre\DAV\Exception\NotFound instead.
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @deprecated Use OldSabre\DAV\Exception\NotFound instead
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class FileNotFound extends NotFound {
+
+}
+
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Forbidden.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Forbidden.php
new file mode 100644
index 0000000..003d86b
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Forbidden.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * Forbidden
+ *
+ * This exception is thrown whenever a user tries to do an operation he's not allowed to
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class Forbidden extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 403;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InsufficientStorage.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InsufficientStorage.php
new file mode 100644
index 0000000..081a3e4
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InsufficientStorage.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * InsufficientStorage
+ *
+ * This Exception can be thrown, when for example a harddisk is full or a quota is exceeded
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class InsufficientStorage extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 507;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InvalidResourceType.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InvalidResourceType.php
new file mode 100644
index 0000000..9526b8d
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/InvalidResourceType.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * InvalidResourceType
+ *
+ * This exception is thrown when the user tried to create a new collection, with
+ * a special resourcetype value that was not recognized by the server.
+ *
+ * See RFC5689 section 3.3
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class InvalidResourceType extends Forbidden {
+
+ /**
+ * This method allows the exception to include additional information into the WebDAV error response
+ *
+ * @param DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(\OldSabre\DAV\Server $server,\DOMElement $errorNode) {
+
+ $error = $errorNode->ownerDocument->createElementNS('DAV:','d:valid-resourcetype');
+ $errorNode->appendChild($error);
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LengthRequired.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LengthRequired.php
new file mode 100644
index 0000000..39cd639
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LengthRequired.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * LengthRequired
+ *
+ * This exception is thrown when a request was made that required a
+ * Content-Length header, but did not contain one.
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class LengthRequired extends DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 411;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LockTokenMatchesRequestUri.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LockTokenMatchesRequestUri.php
new file mode 100644
index 0000000..08d94b5
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/LockTokenMatchesRequestUri.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * LockTokenMatchesRequestUri
+ *
+ * This exception is thrown by UNLOCK if a supplied lock-token is invalid
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class LockTokenMatchesRequestUri extends Conflict {
+
+ /**
+ * Creates the exception
+ */
+ public function __construct() {
+
+ $this->message = 'The locktoken supplied does not match any locks on this entity';
+
+ }
+
+ /**
+ * This method allows the exception to include additional information into the WebDAV error response
+ *
+ * @param DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(DAV\Server $server,\DOMElement $errorNode) {
+
+ $error = $errorNode->ownerDocument->createElementNS('DAV:','d:lock-token-matches-request-uri');
+ $errorNode->appendChild($error);
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Locked.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Locked.php
new file mode 100644
index 0000000..4d38357
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/Locked.php
@@ -0,0 +1,73 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * Locked
+ *
+ * The 423 is thrown when a client tried to access a resource that was locked, without supplying a valid lock token
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class Locked extends DAV\Exception {
+
+ /**
+ * Lock information
+ *
+ * @var OldSabre\DAV\Locks\LockInfo
+ */
+ protected $lock;
+
+ /**
+ * Creates the exception
+ *
+ * A LockInfo object should be passed if the user should be informed
+ * which lock actually has the file locked.
+ *
+ * @param DAV\Locks\LockInfo $lock
+ */
+ public function __construct(DAV\Locks\LockInfo $lock = null) {
+
+ $this->lock = $lock;
+
+ }
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 423;
+
+ }
+
+ /**
+ * This method allows the exception to include additional information into the WebDAV error response
+ *
+ * @param DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(DAV\Server $server,\DOMElement $errorNode) {
+
+ if ($this->lock) {
+ $error = $errorNode->ownerDocument->createElementNS('DAV:','d:lock-token-submitted');
+ $errorNode->appendChild($error);
+
+ $href = $errorNode->ownerDocument->createElementNS('DAV:','d:href');
+ $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri));
+ $error->appendChild(
+ $href
+ );
+ }
+
+ }
+
+}
+
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/MethodNotAllowed.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/MethodNotAllowed.php
new file mode 100644
index 0000000..adf91e2
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/MethodNotAllowed.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * MethodNotAllowed
+ *
+ * The 405 is thrown when a client tried to create a directory on an already existing directory
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class MethodNotAllowed extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 405;
+
+ }
+
+ /**
+ * This method allows the exception to return any extra HTTP response headers.
+ *
+ * The headers must be returned as an array.
+ *
+ * @param \OldSabre\DAV\Server $server
+ * @return array
+ */
+ public function getHTTPHeaders(\OldSabre\DAV\Server $server) {
+
+ $methods = $server->getAllowedMethods($server->getRequestUri());
+
+ return array(
+ 'Allow' => strtoupper(implode(', ',$methods)),
+ );
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotAuthenticated.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotAuthenticated.php
new file mode 100644
index 0000000..2e98802
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotAuthenticated.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * NotAuthenticated
+ *
+ * This exception is thrown when the client did not provide valid
+ * authentication credentials.
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class NotAuthenticated extends DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 401;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotFound.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotFound.php
new file mode 100644
index 0000000..210f21f
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotFound.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * NotFound
+ *
+ * This Exception is thrown when a Node couldn't be found. It returns HTTP error code 404
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class NotFound extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 404;
+
+ }
+
+}
+
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotImplemented.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotImplemented.php
new file mode 100644
index 0000000..f9624e8
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/NotImplemented.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * NotImplemented
+ *
+ * This exception is thrown when the client tried to call an unsupported HTTP method or other feature
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class NotImplemented extends \OldSabre\DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 501;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PaymentRequired.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PaymentRequired.php
new file mode 100644
index 0000000..1fd18be
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PaymentRequired.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * Payment Required
+ *
+ * The PaymentRequired exception may be thrown in a case where a user must pay
+ * to access a certain resource or operation.
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class PaymentRequired extends DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 402;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PreconditionFailed.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PreconditionFailed.php
new file mode 100644
index 0000000..625a7fc
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/PreconditionFailed.php
@@ -0,0 +1,71 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * PreconditionFailed
+ *
+ * This exception is normally thrown when a client submitted a conditional request,
+ * like for example an If, If-None-Match or If-Match header, which caused the HTTP
+ * request to not execute (the condition of the header failed)
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class PreconditionFailed extends DAV\Exception {
+
+ /**
+ * When this exception is thrown, the header-name might be set.
+ *
+ * This allows the exception-catching code to determine which HTTP header
+ * caused the exception.
+ *
+ * @var string
+ */
+ public $header = null;
+
+ /**
+ * Create the exception
+ *
+ * @param string $message
+ * @param string $header
+ */
+ public function __construct($message, $header=null) {
+
+ parent::__construct($message);
+ $this->header = $header;
+
+ }
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 412;
+
+ }
+
+ /**
+ * This method allows the exception to include additional information into the WebDAV error response
+ *
+ * @param DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(DAV\Server $server,\DOMElement $errorNode) {
+
+ if ($this->header) {
+ $prop = $errorNode->ownerDocument->createElement('s:header');
+ $prop->nodeValue = $this->header;
+ $errorNode->appendChild($prop);
+ }
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ReportNotSupported.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ReportNotSupported.php
new file mode 100644
index 0000000..f1d42ba
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ReportNotSupported.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * ReportNotSupported
+ *
+ * This exception is thrown when the client requested an unknown report through the REPORT method
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class ReportNotSupported extends Forbidden {
+
+ /**
+ * This method allows the exception to include additional information into the WebDAV error response
+ *
+ * @param DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(DAV\Server $server,\DOMElement $errorNode) {
+
+ $error = $errorNode->ownerDocument->createElementNS('DAV:','d:supported-report');
+ $errorNode->appendChild($error);
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/RequestedRangeNotSatisfiable.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/RequestedRangeNotSatisfiable.php
new file mode 100644
index 0000000..5528cde
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/RequestedRangeNotSatisfiable.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * RequestedRangeNotSatisfiable
+ *
+ * This exception is normally thrown when the user
+ * request a range that is out of the entity bounds.
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class RequestedRangeNotSatisfiable extends DAV\Exception {
+
+ /**
+ * returns the http statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 416;
+
+ }
+
+}
+
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ServiceUnavailable.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ServiceUnavailable.php
new file mode 100644
index 0000000..94993f2
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/ServiceUnavailable.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+use OldSabre\DAV;
+
+/**
+ * ServiceUnavailable
+ *
+ * This exception is thrown in case the service
+ * is currently not available (e.g. down for maintenance).
+ *
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class ServiceUnavailable extends DAV\Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 503;
+
+ }
+
+}
diff --git a/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/UnsupportedMediaType.php b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/UnsupportedMediaType.php
new file mode 100644
index 0000000..32ba6f1
--- /dev/null
+++ b/calendar/lib/SabreDAV/lib/OldSabre/DAV/Exception/UnsupportedMediaType.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace OldSabre\DAV\Exception;
+
+/**
+ * UnSupportedMediaType
+ *
+ * The 415 Unsupported Media Type status code is generally sent back when the client
+ * tried to call an HTTP method, with a body the server didn't understand
+ *
+ * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class UnsupportedMediaType extends \OldSabre\DAV\Exception {
+
+ /**
+ * returns the http statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 415;
+
+ }
+
+}

© 2014-2024 Faster IT GmbH | imprint | privacy policy