Merge pull request #72 from nawawi/master

fix default value for port
This commit is contained in:
Jamie Cameron
2013-11-17 11:10:55 -08:00

View File

@@ -10,7 +10,7 @@ $ENV{'PATH_INFO'} =~ /^\/(http|https):\/+([^:\/]+)(:(\d+))?(.*)$/ ||
$protocol = $1;
$ssl = $protocol eq "https";
$host = $2;
$port = $4 || 80;
$port = $4 || ( !$ssl ? 80 : 443 );
$path = $5 || "/";
$openurl = "$1://$2$3$5";
$baseurl = "$1://$2$3";