summaryrefslogtreecommitdiffstats
path: root/lib/router.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-11 00:57:46 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-11 00:57:46 +0200
commit1763de08d0a4e8374cd21bf71d825b92426509f1 (patch)
tree3dc1b82ed67a129af56c4c5bc4246b45e6d8f3f8 /lib/router.php
parentc2160433cd171a25c0ddb92959b8ae986d8aaf78 (diff)
downloadnextcloud-server-1763de08d0a4e8374cd21bf71d825b92426509f1.tar.gz
nextcloud-server-1763de08d0a4e8374cd21bf71d825b92426509f1.zip
Routing: Fix construction of RequestContext
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/router.php b/lib/router.php
index dbcaff4026e..eca59d6dc3b 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -54,7 +54,11 @@ class OC_Router {
}
public function match($url) {
- $context = new RequestContext($_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD']);
+ $baseUrl = OC_Helper::linkTo('', 'index.php');
+ $method = $_SERVER['REQUEST_METHOD'];
+ $host = OC_Request::serverHost();
+ $schema = OC_Request::serverProtocol();
+ $context = new RequestContext($baseUrl, $method, $host, $schema);
$matcher = new UrlMatcher($this->root, $context);
$parameters = $matcher->match($url);
if (isset($parameters['action'])) {