diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-06-30 00:53:01 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-30 00:53:01 -0700 |
commit | cd3eb95ed1f3dc3e04cfc2b3b405f75b3ab086da (patch) | |
tree | 1d1fa232dbfca20fd58011db159b463bc07d4a16 /rt/lib | |
parent | 8e78ec5f878096af1db599b2310c94adcea4fea0 (diff) |
fix dev operation @ localhost, RT#13852
Diffstat (limited to 'rt/lib')
-rw-r--r-- | rt/lib/RT/Interface/Web.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index 814a8293f..262aeacde 100644 --- a/rt/lib/RT/Interface/Web.pm +++ b/rt/lib/RT/Interface/Web.pm @@ -1251,8 +1251,9 @@ to handle common problems such as localhost vs 127.0.0.1 =cut sub _NormalizeHost { - - my $uri= URI->new(shift); + my $s = shift; + $s = "http://$s" unless $s =~ /^http/i; + my $uri= URI->new($s); $uri->host('127.0.0.1') if $uri->host eq 'localhost'; return $uri; |