Skip to content
Snippets Groups Projects
Commit 1763de08 authored by Bart Visscher's avatar Bart Visscher
Browse files

Routing: Fix construction of RequestContext

parent c2160433
Branches
No related tags found
No related merge requests found
...@@ -54,7 +54,11 @@ class OC_Router { ...@@ -54,7 +54,11 @@ class OC_Router {
} }
public function match($url) { 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); $matcher = new UrlMatcher($this->root, $context);
$parameters = $matcher->match($url); $parameters = $matcher->match($url);
if (isset($parameters['action'])) { if (isset($parameters['action'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment