aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:38 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:38 +0100
commit0434ccf303e1313e0b157012da9fb8ded26e886b (patch)
tree6e3947fd759cc8cfce52a7d70dba5367e270affc /phpBB/common.php
parent2ba97da524f73f3a7244cd68b7f3daee7a1933a6 (diff)
parent21ce0215193d34a5f689209c80f6db3ef7cb84c5 (diff)
downloadforums-0434ccf303e1313e0b157012da9fb8ded26e886b.tar
forums-0434ccf303e1313e0b157012da9fb8ded26e886b.tar.gz
forums-0434ccf303e1313e0b157012da9fb8ded26e886b.tar.bz2
forums-0434ccf303e1313e0b157012da9fb8ded26e886b.tar.xz
forums-0434ccf303e1313e0b157012da9fb8ded26e886b.zip
Merge commit 'release-3.0.1-RC1'
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index ebffd46228..4fca1be2b4 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -131,7 +131,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;
@@ -150,7 +150,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;