Added php-opencloud/openstack as SubModule
This commit is contained in:
parent
eac860ce50
commit
81d5c2a646
15 changed files with 282 additions and 178 deletions
|
@ -209,6 +209,14 @@ function modify_request(RequestInterface $request, array $changes)
|
|||
// Remove the host header if one is on the URI
|
||||
if ($host = $changes['uri']->getHost()) {
|
||||
$changes['set_headers']['Host'] = $host;
|
||||
|
||||
if ($port = $changes['uri']->getPort()) {
|
||||
$standardPorts = ['http' => 80, 'https' => 443];
|
||||
$scheme = $changes['uri']->getScheme();
|
||||
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
|
||||
$changes['set_headers']['Host'] .= ':'.$port;
|
||||
}
|
||||
}
|
||||
}
|
||||
$uri = $changes['uri'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue