diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-11 00:57:46 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-11 00:57:46 +0200 |
commit | 1763de08d0a4e8374cd21bf71d825b92426509f1 (patch) | |
tree | 3dc1b82ed67a129af56c4c5bc4246b45e6d8f3f8 /lib/router.php | |
parent | c2160433cd171a25c0ddb92959b8ae986d8aaf78 (diff) | |
download | nextcloud-server-1763de08d0a4e8374cd21bf71d825b92426509f1.tar.gz nextcloud-server-1763de08d0a4e8374cd21bf71d825b92426509f1.zip |
Routing: Fix construction of RequestContext
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 6 |
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'])) { |