1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Merging revisions #r8346, #r8347 and #r8348

git-svn-id: file:///svn/phpbb/trunk@8349 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2008-01-29 15:57:56 +00:00
parent e970da6514
commit 1407460895
10 changed files with 117 additions and 90 deletions

View File

@@ -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;