my $query = $env->{QUERY_STRING} ? '?' . $env->{QUERY_STRING} : '';
my $uri = $scheme . '://' . $host . '/' . $path . $query;
- $ctx->request->uri( bless \$uri, $uri_class );
+ $ctx->request->uri( (bless \$uri, $uri_class)->canonical );
# set the base URI
# base must end in a slash
sub run {
my ($self, $app, @args) = @_;
- Carp::cluck("Run");
# FIXME - Do something sensible with the options we're passed
$self->_run_psgi_app($self->_build_psgi_app($app, @args), @args);
}
}
sub _run_psgi_app {
- my ($self, $psgi_app, @args);
+ my ($self, $psgi_app, @args) = @_;
# FIXME - Need to be able to specify engine and pass options..
- Plack::Loader->auto()->run($psgi_app);
+ Plack::Loader->auto(port => $args[0])->run($psgi_app);
}
=head2 $self->write($c, $buffer)