diff options
author | Christian Schneider | 2009-08-12 13:37:43 +0000 |
---|---|---|
committer | Christian Schneider | 2009-08-12 13:37:43 +0000 |
commit | 8ad04ba59d1a84514a5f9d7ad2482e649d44da00 (patch) | |
tree | 8986f3b59151f7314234b8f4902c797a394c5cc5 /it_url.class | |
parent | 0a42e1dd0e9e448751b091e67989ad7c2437181e (diff) | |
download | itools-8ad04ba59d1a84514a5f9d7ad2482e649d44da00.tar.gz itools-8ad04ba59d1a84514a5f9d7ad2482e649d44da00.tar.bz2 itools-8ad04ba59d1a84514a5f9d7ad2482e649d44da00.zip |
Do not add port 443 in HTTPS mode
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index 83c0781..692f825 100644 --- a/it_url.class +++ b/it_url.class @@ -583,7 +583,7 @@ function absolute($url=null) { $dir = preg_replace('#/[^/]*$#', '/', $_SERVER['PHP_SELF']); $url = preg_match('#^/#', $url) ? $url : "$dir$url"; - $url = "//" . $_SERVER['HTTP_HOST'] . ($_SERVER['SERVER_PORT'] == 80 ? "" : ":{$_SERVER['SERVER_PORT']}") . $url; + $url = "//" . $_SERVER['HTTP_HOST'] . ($_SERVER['SERVER_PORT'] == (isset($_SERVER['HTTPS']) ? 443 : 80) ? "" : ":{$_SERVER['SERVER_PORT']}") . $url; } $url = "http" . (isset($_SERVER['HTTPS']) ? 's':'') . ":$url"; } |