mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2852 from stojg/director-test-http-port
BUG: Director::test() don't respect port settings in $_FILE_TO_URL_MAPPING
This commit is contained in:
commit
3b9d49e32d
@ -247,7 +247,13 @@ class Director implements TemplateGlobalProvider {
|
||||
// Handle absolute URLs
|
||||
if (@parse_url($url, PHP_URL_HOST) != '') {
|
||||
$bits = parse_url($url);
|
||||
// If a port is mentioned in the absolute URL, be sure to add that into the
|
||||
// HTTP host
|
||||
if(isset($bits['port'])) {
|
||||
$_SERVER['HTTP_HOST'] = $bits['host'].':'.$bits['port'];
|
||||
} else {
|
||||
$_SERVER['HTTP_HOST'] = $bits['host'];
|
||||
}
|
||||
$url = Director::makeRelative($url);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user