Strip :port from HTTP_HOST when composing an absolute URL (#2444)
This commit is contained in:
parent
84e8e1a41d
commit
4cb0d62776
1 changed files with 1 additions and 1 deletions
|
@ -2273,7 +2273,7 @@ class calendar extends rcube_plugin
|
||||||
$schema = 'https';
|
$schema = 'https';
|
||||||
$default_port = 443;
|
$default_port = 443;
|
||||||
}
|
}
|
||||||
$url = $schema . '://' . $_SERVER['HTTP_HOST'];
|
$url = $schema . '://' . preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']);
|
||||||
if ($_SERVER['SERVER_PORT'] != $default_port)
|
if ($_SERVER['SERVER_PORT'] != $default_port)
|
||||||
$url .= ':' . $_SERVER['SERVER_PORT'];
|
$url .= ':' . $_SERVER['SERVER_PORT'];
|
||||||
if (dirname($_SERVER['SCRIPT_NAME']) != '/')
|
if (dirname($_SERVER['SCRIPT_NAME']) != '/')
|
||||||
|
|
Loading…
Add table
Reference in a new issue