From a3cbb652a61209623d4bc932519a1d22693dcf93 Mon Sep 17 00:00:00 2001 From: yonikok Date: Mon, 17 Dec 2018 15:14:26 +0100 Subject: [PATCH] Fixes URI parsing When $this->server->get('REQUEST_URI'); passes //foo/bar the parse_url function assumes that foo is the host and not part of the path. --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 8d458d148dc01..33fb0f36beb5b 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1700,7 +1700,7 @@ protected function prepareRequestUri() $requestUri = $this->server->get('REQUEST_URI'); // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, only use URL path - $uriComponents = parse_url($requestUri); + $uriComponents = parse_url($this->getSchemeAndHttpHost().$requestUri); if (isset($uriComponents['path'])) { $requestUri = $uriComponents['path'];