diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-31 22:33:53 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-07-31 22:33:53 +0200 |
commit | 006b127da44b8cf0771000ed6fbf2228dfe734f6 (patch) | |
tree | 1120157f0d5fb91815f702520ce9f474d7fc20b3 /ocs/v1.php | |
parent | 9d6a09f58946c8d4e7903d5b25a5fb00f6bcb5e8 (diff) | |
download | nextcloud-server-006b127da44b8cf0771000ed6fbf2228dfe734f6.tar.gz nextcloud-server-006b127da44b8cf0771000ed6fbf2228dfe734f6.zip |
Routing: Handle MethodNotAllowedException
Diffstat (limited to 'ocs/v1.php')
-rw-r--r-- | ocs/v1.php | 3 |
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); } |