X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FCGI.pm;h=ca86d79c9147ed21cf7a3fbaa9eff584095c35f1;hb=9b8ed9d14aa1b59e136392b4fdf335f6205e798a;hp=8ceaef1779c5956bff8ac3e7141d56f012b772b7;hpb=e512dd249ef1911d256f91f39ea5beaad85f73a9;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 8ceaef1..ca86d79 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -143,10 +143,10 @@ sub prepare_path { # Using URI directly is way too slow, so we construct the URLs manually my $uri_class = "URI::$scheme"; - # HTTP_HOST will include the port even if it's 80 - $host =~ s/:80$//; + # HTTP_HOST will include the port even if it's 80/443 + $host =~ s/:(?:80|443)$//; - if ( $port != 80 && $host !~ /:/ ) { + if ( $port !~ /^(?:80|443)$/ && $host !~ /:/ ) { $host .= ":$port"; } @@ -239,15 +239,11 @@ sub run { shift; shift->handle_request(@_) } =head1 SEE ALSO -L L. +L, L =head1 AUTHORS -Sebastian Riedel, - -Christian Hansen, - -Andy Grundman, +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT