fixed base for apache
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / Apache.pm
index 0bba6ad..94dacf1 100644 (file)
@@ -140,7 +140,8 @@ sub prepare_path {
     $base->scheme( $c->apache_request->protocol =~ /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 );
 }