diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-01-29 15:57:56 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-01-29 15:57:56 +0000 |
commit | 140746089594307c9bc2ad084ea2355dcbddbe16 (patch) | |
tree | b9c2f876617ee14253fe9d36b3520b2464497eaa /phpBB/common.php | |
parent | e970da651479853156a7f1d7d9407d787c694bed (diff) | |
download | forums-140746089594307c9bc2ad084ea2355dcbddbe16.tar forums-140746089594307c9bc2ad084ea2355dcbddbe16.tar.gz forums-140746089594307c9bc2ad084ea2355dcbddbe16.tar.bz2 forums-140746089594307c9bc2ad084ea2355dcbddbe16.tar.xz forums-140746089594307c9bc2ad084ea2355dcbddbe16.zip |
Merging revisions #r8346, #r8347 and #r8348
git-svn-id: file:///svn/phpbb/trunk@8349 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/common.php')
-rw-r--r-- | phpBB/common.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index 19ec820cfb..b91fd01706 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -132,7 +132,7 @@ if (!defined('PHPBB_INSTALLED')) // Redirect the user to the installer // We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information // available as used by the redirect function - $server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'); + $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'); $secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0; @@ -151,7 +151,11 @@ if (!defined('PHPBB_INSTALLED')) if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80))) { - $url .= ':' . $server_port; + // HTTP HOST can carry a port number... + if (strpos($server_name, ':') === false) + { + $url .= ':' . $server_port; + } } $url .= $script_path; |