summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}