summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-07-03 12:33:04 -0700
committerBart Visscher <bartv@thisnet.nl>2013-07-03 12:33:04 -0700
commit20be58bfdc7239d146fc8d99cd9d77b4d50deff8 (patch)
tree403cf73df9a7dca09090a4fa54d8f1c893baafd0
parentaa7d8edd14603cc06253fc018573382f60873911 (diff)
parent22d759964f120395cae67319e3d1e03f7ae4006b (diff)
downloadnextcloud-server-20be58bfdc7239d146fc8d99cd9d77b4d50deff8.tar.gz
nextcloud-server-20be58bfdc7239d146fc8d99cd9d77b4d50deff8.zip
Merge pull request #3888 from owncloud/ocs_api_fixes
Ocs api fixes
-rw-r--r--lib/api.php2
-rw-r--r--ocs/v1.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php
index fc76836995b..31f3f968d9b 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -67,6 +67,8 @@ class OC_API {
OC::getRouter()->useCollection('ocs');
OC::getRouter()->create($name, $url)
->method($method)
+ ->defaults($defaults)
+ ->requirements($requirements)
->action('OC_API', 'call');
self::$actions[$name] = array();
}
diff --git a/ocs/v1.php b/ocs/v1.php
index af83a56ff14..1c7d1c89768 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -26,7 +26,7 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
try {
- OC::getRouter()->match('/ocs'.$_SERVER['PATH_INFO']);
+ OC::getRouter()->match('/ocs'.OC_Request::getRawPathInfo());
} catch (ResourceNotFoundException $e) {
OC_OCS::notFound();
} catch (MethodNotAllowedException $e) {