summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/exception
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-07 15:11:47 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-07 15:11:47 +0200
commit730c80ff9c83ff1b027ab804ecad599fbcaf7bd3 (patch)
tree500d6f4480f41563090ef29c1d4652c367519759 /lib/private/connector/sabre/exception
parent1e47468c53964591905760c2f7fad14725bdb1de (diff)
downloadnextcloud-server-730c80ff9c83ff1b027ab804ecad599fbcaf7bd3.tar.gz
nextcloud-server-730c80ff9c83ff1b027ab804ecad599fbcaf7bd3.zip
adding additional exceptions for special cases where creating a file might not be allowed
Diffstat (limited to 'lib/private/connector/sabre/exception')
-rw-r--r--lib/private/connector/sabre/exception/entitytoolarge.php23
-rw-r--r--lib/private/connector/sabre/exception/unsupportedmediatype.php22
2 files changed, 45 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/exception/entitytoolarge.php b/lib/private/connector/sabre/exception/entitytoolarge.php
new file mode 100644
index 00000000000..aa9b37a0496
--- /dev/null
+++ b/lib/private/connector/sabre/exception/entitytoolarge.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * EntityTooLarge
+ *
+ * This exception is thrown whenever a user tries to upload a file which exceeds hard limitations
+ *
+ */
+class OC_Connector_Sabre_Exception_EntityTooLarge extends Sabre_DAV_Exception {
+
+ /**
+ * Returns the HTTP statuscode for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+// return 413;
+
+ return 450;
+ }
+
+}
diff --git a/lib/private/connector/sabre/exception/unsupportedmediatype.php b/lib/private/connector/sabre/exception/unsupportedmediatype.php
new file mode 100644
index 00000000000..a8b561280c1
--- /dev/null
+++ b/lib/private/connector/sabre/exception/unsupportedmediatype.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * Unsupported Media Type
+ *
+ * This exception is thrown whenever a user tries to upload a file which holds content which is not allowed
+ *
+ */
+class OC_Connector_Sabre_Exception_UnsupportedMediaType extends Sabre_DAV_Exception {
+
+ /**
+ * Returns the HTTP status code for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 415;
+
+ }
+
+}