$port = $c->request->secure ? 443 : 80;
}
- # set the base URI
- # base must end in a slash
- $base_path .= '/' unless ( $base_path =~ /\/$/ );
-
+ # set the request URI
my $path = $base_path . ( $ENV{PATH_INFO} || '' );
$path =~ s{^/+}{};
$c->request->uri( bless \$uri, $uri_class );
- # sanitize the URI
- $uri = $uri->canonical;
- $c->request->uri($uri);
- my $base = $uri->clone;
- $base->path_query($base_path);
- $c->request->base($base);
+ # set the base URI
+ # base must end in a slash
+ $base_path .= '/' unless $base_path =~ m{/$};
+
+ my $base_uri = $scheme . '://' . $host . $base_path;
+
+ $c->request->base( bless \$base_uri, $uri_class );
}
=head2 $self->prepare_query_parameters($c)