X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FApache.pm;h=fc69b1c2d74220f25aba82de5c74a4286ea0e030;hb=502619e59524272fc07491f9d2d6958304df3fa4;hp=ebc3aa169c1fdff4ec82ab6e1c63023f750943c2;hpb=b9d646b0639770fc08de91c983babc53b2a3b865;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/Apache.pm b/lib/Catalyst/Engine/Apache.pm index ebc3aa1..fc69b1c 100644 --- a/lib/Catalyst/Engine/Apache.pm +++ b/lib/Catalyst/Engine/Apache.pm @@ -137,12 +137,12 @@ sub prepare_path { no warnings 'uninitialized'; $c->req->{path} =~ s/^($loc)?\///; my $base = URI->new; - $base->scheme( $c->apache_request->protocol =~ /HTTPS/ ? 'https' : 'http' ); + $base->scheme( $ENV{HTTPS} ? 'https' : 'http' ); $base->host( $c->apache_request->hostname ); $base->port( $c->apache_request->get_server_port ); - $base->path( $c->apache_request->location ); + my $path = $c->apache_request->location; + $base->path( $path =~ /\/$/ ? $path : "$path/" ); $c->req->base( $base->as_string ); - $c->req->server_base( $base->scheme . '://' . $base->authority . '/' ); } =head3 prepare_request