diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-12 03:35:19 +0400 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-12 18:40:54 +0400 |
commit | 14b9eba4285c2af551af665577b1a286b3245f37 (patch) | |
tree | 5cc446e975e564aff191c52290011f358f6b32bc /ocs | |
parent | 6a31fecca33ce9670477009087ae29aa197c3c3f (diff) |
set content-type on ocs exceptions
Diffstat (limited to 'ocs')
-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 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); } |