4 use Test::More tests => 4; # last test to print
8 $ENV{HTTP_X_FORWARDED_HOST} = 'proxy:8484';
9 $ENV{SERVER_PROTOCOL} = 'HTTP/1.0';
10 $ENV{SERVER_PORT} = 8080;
11 $ENV{SERVER_NAME} = 'the.good.ship.lollypop.com';
13 is virtual_port() => 8484, 'virtual_port()';
14 is server_port() => 8080, 'server_port()';
16 is url() => 'http://proxy:8484', 'url()';
18 # let's see if we do the defaults right
20 $ENV{HTTP_X_FORWARDED_HOST} = 'proxy:80';
22 is url() => 'http://proxy', 'url() with default port';