Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-01 00:33:53 +0400
committerBart Visscher <bartv@thisnet.nl>2012-08-01 00:33:53 +0400
commit006b127da44b8cf0771000ed6fbf2228dfe734f6 (patch)
tree1120157f0d5fb91815f702520ce9f474d7fc20b3 /ocs/v1.php
parent9d6a09f58946c8d4e7903d5b25a5fb00f6bcb5e8 (diff)
Routing: Handle MethodNotAllowedException
Diffstat (limited to 'ocs/v1.php')
-rw-r--r--ocs/v1.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 4580221e600..7cd61035e7c 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -23,6 +23,7 @@
require_once('../lib/base.php');
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
+use Symfony\Component\Routing\Exception\MethodNotAllowedException;
OC::$router->useCollection('ocs');
OC::$router->loadRoutes();
@@ -31,4 +32,6 @@ try {
OC::$router->match($_SERVER['PATH_INFO']);
} catch (ResourceNotFoundException $e) {
OC_OCS::notFound();
+} catch (MethodNotAllowedException $e) {
+ OC_Response::setStatus(405);
}