diff --git a/tests/ChangeLog b/tests/ChangeLog index a5146aba..ac4109a5 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2006-05-26 Mauro Tortonesi + + * HTTPServer.pm: Fixed bug when returning 404. Improved logging. + + * Test.pm: Added support for command lines which use an absolute path + for the Wget binary. + 2006-04-28 Mauro Tortonesi * Test5.px: Added test for HTTP Content-Disposition support. diff --git a/tests/HTTPServer.pm b/tests/HTTPServer.pm index c66ef853..6747359e 100755 --- a/tests/HTTPServer.pm +++ b/tests/HTTPServer.pm @@ -19,6 +19,7 @@ sub run { my ($self, $urls) = @_; while (my $con = $self->accept) { + print STDERR "Accepted a new connection\n" if $log; while (my $req = $con->get_request) { my $url_path = $req->url->path; if ($url_path =~ m{/$}) { @@ -71,8 +72,10 @@ sub run { } else { print STDERR "Requested wrong URL: ", $url_path, "\n" if $log; $con->send_error($HTTP::Status::RC_FORBIDDEN); - } + last; + } } + print STDERR "Closing connection\n" if $log; $con->close; undef($con); } diff --git a/tests/Test.pm b/tests/Test.pm index d25ee4ff..d996e77d 100755 --- a/tests/Test.pm +++ b/tests/Test.pm @@ -81,7 +81,10 @@ sub run { # Call wget chdir ("$self->{_workdir}/$self->{_name}/output"); # print "Calling $self->{_cmdline}\n"; - my $errcode = system ("$self->{_workdir}/../src/$self->{_cmdline}"); + my $errcode = + ($self->{_cmdline} =~ m{^/.*}) + ? system ($self->{_cmdline}) + : system ("$self->{_workdir}/../src/$self->{_cmdline}"); # Shutdown server kill ('TERM', $pid);