Merge pull request #13694 from b108/duplicate-functionality-in-request-class
Remove duplicate functionality
This commit is contained in:
commit
23245904d3
|
@ -759,11 +759,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
||||||
*/
|
*/
|
||||||
public function getRawPathInfo(): string {
|
public function getRawPathInfo(): string {
|
||||||
$requestUri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : '';
|
$requestUri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : '';
|
||||||
// remove too many leading slashes - can be caused by reverse proxy configuration
|
// remove too many slashes - can be caused by reverse proxy configuration
|
||||||
if (strpos($requestUri, '/') === 0) {
|
|
||||||
$requestUri = '/' . ltrim($requestUri, '/');
|
|
||||||
}
|
|
||||||
|
|
||||||
$requestUri = preg_replace('%/{2,}%', '/', $requestUri);
|
$requestUri = preg_replace('%/{2,}%', '/', $requestUri);
|
||||||
|
|
||||||
// Remove the query string from REQUEST_URI
|
// Remove the query string from REQUEST_URI
|
||||||
|
|
Loading…
Reference in New Issue