diff options
Diffstat (limited to 'ocs/v1.php')
-rw-r--r-- | ocs/v1.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ocs/v1.php b/ocs/v1.php index 93d9c67b045..62a3511e611 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -30,12 +30,12 @@ try { // load all apps to get all api routes properly setup OC_App::loadApps(); - // match the request - OC::getRouter()->match('/ocs'.OC_Request::getRawPathInfo()); - + OC::$server->getRouter()->match('/ocs'.OC_Request::getRawPathInfo()); } catch (ResourceNotFoundException $e) { + OC_API::setContentType(); OC_OCS::notFound(); } catch (MethodNotAllowedException $e) { + OC_API::setContentType(); OC_Response::setStatus(405); } |