$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 );
}