Skip to content
Snippets Groups Projects
Commit 006b127d authored by Bart Visscher's avatar Bart Visscher
Browse files

Routing: Handle MethodNotAllowedException

parent 9d6a09f5
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment