Browse Source

Routing: Handle MethodNotAllowedException

tags/v5.0.0alpha1
Bart Visscher 12 years ago
parent
commit
006b127da4
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      ocs/v1.php

+ 3
- 0
ocs/v1.php View File

@@ -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);
}

Loading…
Cancel
Save