summaryrefslogtreecommitdiffstats
path: root/ocs/v1.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-03-12 00:35:19 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-03-12 00:35:19 +0100
commit743addd1e317c760e8b1e4ad7dc149476e4ad282 (patch)
tree2f0b4d3f9c922153408d9919a8a52d14aec8edbf /ocs/v1.php
parent364e1f852fe8640d7d6fa149f784a0d2d1de0a57 (diff)
downloadnextcloud-server-743addd1e317c760e8b1e4ad7dc149476e4ad282.tar.gz
nextcloud-server-743addd1e317c760e8b1e4ad7dc149476e4ad282.zip
set content-type on ocs exceptions
Diffstat (limited to 'ocs/v1.php')
-rw-r--r--ocs/v1.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 1c7d1c89768..9d84f482ef7 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -28,8 +28,11 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException;
try {
OC::getRouter()->match('/ocs'.OC_Request::getRawPathInfo());
} catch (ResourceNotFoundException $e) {
+ OC_API::setContentType();
OC_OCS::notFound();
} catch (MethodNotAllowedException $e) {
+ setOcsContentType();
+ OC_API::setContentType();
OC_Response::setStatus(405);
}