Fix bug where the colon between host and port would appear, even when port was an empty string.
This commit is contained in:
parent
52d9317cfd
commit
bfabd20ae4
@ -288,9 +288,11 @@ class Request
|
|||||||
// $host = (isset($parts['host'])) ? explode(':', $parts['host'])[0] : '';
|
// $host = (isset($parts['host'])) ? explode(':', $parts['host'])[0] : '';
|
||||||
$path = (isset($parts['path'])) ? $parts['path'] : '';
|
$path = (isset($parts['path'])) ? $parts['path'] : '';
|
||||||
|
|
||||||
if (($scheme == 'https' && $port != '443')
|
if ($port) {
|
||||||
|| ($scheme == 'http' && $port != '80')) {
|
if (('https' == $scheme && $port != '443')
|
||||||
$host = "$host:$port";
|
|| ('http' == $scheme && $port != '80')) {
|
||||||
|
$host = "$host:$port";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "$scheme://$host$path";
|
return "$scheme://$host$path";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user