mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Avoid double slash in Director mock URLs
They get faulty results when run through parse_url($url, PHP_URL_PATH) which we started using in HTTPRequestBuilder
This commit is contained in:
parent
cea5cd1c3e
commit
bd11bc16c7
@ -255,7 +255,7 @@ class Director implements TemplateGlobalProvider
|
||||
} else {
|
||||
$newVars['_GET'] = [];
|
||||
}
|
||||
$newVars['_SERVER']['REQUEST_URI'] = Director::baseURL() . $url;
|
||||
$newVars['_SERVER']['REQUEST_URI'] = Director::baseURL() . ltrim($url, '/');
|
||||
$newVars['_REQUEST'] = array_merge($newVars['_GET'], $newVars['_POST']);
|
||||
|
||||
// Normalise vars
|
||||
|
Loading…
Reference in New Issue
Block a user