Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions t/lib/TestServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ sub perl_cmd {
$perl = qq["$perl"]
if $perl =~ /\s/;

my @libs = $self->lib_dirs;
for my $lib ($self->lib_dirs) {
my $quoted = $lib =~ /\s/ ? qq["$lib"] : $lib;
$perl .= " -I$quoted";
Expand Down Expand Up @@ -143,7 +142,7 @@ sub run {
while (my $c = $d->accept) {
my $r = $c->get_request;
if ($r) {
$self->dispatch($c, $r->method, $r->uri, $r);
$self->dispatch($c, $r);
}
$c = undef; # close connection
}
Expand All @@ -153,7 +152,7 @@ sub run {

sub dispatch {
my $self = shift;
my ($c, $method, $uri, $request) = @_;
my ($c) = @_;

$c->send_error(404);
}
Expand Down
4 changes: 3 additions & 1 deletion t/lib/TestServer/BasicTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use File::Temp qw(tempfile);

sub dispatch {
my $self = shift;
my ($c, $method, $uri, $request) = @_;
my ($c, $request) = @_;
my $method = $request->method;
my $uri = $request->uri;
my $p = ($uri->path_segments)[1];
my $call = lc("httpd_" . $method . "_$p");
if ($self->can($call)) {
Expand Down
3 changes: 2 additions & 1 deletion t/lib/TestServer/Reflect.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use HTTP::Response;

sub dispatch {
my $self = shift;
my ($c, $method, $uri, $request) = @_;
my ($c, $request) = @_;
my $uri = $request->uri;

if ($uri eq '/content-length') {
my $res = HTTP::Response->new(200);
Expand Down