summaryrefslogtreecommitdiffstats
path: root/ocs
diff options
context:
space:
mode:
Diffstat (limited to 'ocs')
-rw-r--r--ocs/providers.php2
-rw-r--r--ocs/v1.php6
2 files changed, 5 insertions, 3 deletions
diff --git a/ocs/providers.php b/ocs/providers.php
index bf94b85dcfb..2c62f767ad3 100644
--- a/ocs/providers.php
+++ b/ocs/providers.php
@@ -23,6 +23,8 @@
require_once '../lib/base.php';
+header('Content-type: application/xml');
+
$url=OCP\Util::getServerProtocol().'://'.substr(OCP\Util::getServerHost().OCP\Util::getRequestUri(), 0, -17).'ocs/v1.php/';
echo('
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);
}