+2006-05-26 Mauro Tortonesi <mauro@ferrara.linux.it>
+
+ * 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 <mauro@ferrara.linux.it>
* Test5.px: Added test for HTTP Content-Disposition support.
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{/$}) {
} 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);
}
# 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);