fixed a bug in CGI that prevented honoring the 'hostname' configuration option

This commit is contained in:
Jordi Sanfeliu 2013-01-14 16:49:16 +01:00
parent 48aad4df9f
commit 4ec1e63f69
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ my $conf = new Config::General(
%config = $conf->getall;
$config{url} = $ENV{HTTPS} ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST};
$config{hostname} = $ENV{SERVER_NAME};
$config{hostname} = $config{hostname} || $ENV{SERVER_NAME};
if(!($config{hostname})) { # called from the command line
$config{hostname} = "127.0.0.1";
$config{url} = "http://127.0.0.1";