mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Minor bugfixing for test suite.
This commit is contained in:
parent
01093c0c33
commit
a309257cbd
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2006-04-28 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
* Test5.px: Added test for HTTP Content-Disposition support.
|
* Test5.px: Added test for HTTP Content-Disposition support.
|
||||||
|
@ -19,6 +19,7 @@ sub run {
|
|||||||
my ($self, $urls) = @_;
|
my ($self, $urls) = @_;
|
||||||
|
|
||||||
while (my $con = $self->accept) {
|
while (my $con = $self->accept) {
|
||||||
|
print STDERR "Accepted a new connection\n" if $log;
|
||||||
while (my $req = $con->get_request) {
|
while (my $req = $con->get_request) {
|
||||||
my $url_path = $req->url->path;
|
my $url_path = $req->url->path;
|
||||||
if ($url_path =~ m{/$}) {
|
if ($url_path =~ m{/$}) {
|
||||||
@ -71,8 +72,10 @@ sub run {
|
|||||||
} else {
|
} else {
|
||||||
print STDERR "Requested wrong URL: ", $url_path, "\n" if $log;
|
print STDERR "Requested wrong URL: ", $url_path, "\n" if $log;
|
||||||
$con->send_error($HTTP::Status::RC_FORBIDDEN);
|
$con->send_error($HTTP::Status::RC_FORBIDDEN);
|
||||||
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print STDERR "Closing connection\n" if $log;
|
||||||
$con->close;
|
$con->close;
|
||||||
undef($con);
|
undef($con);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,10 @@ sub run {
|
|||||||
# Call wget
|
# Call wget
|
||||||
chdir ("$self->{_workdir}/$self->{_name}/output");
|
chdir ("$self->{_workdir}/$self->{_name}/output");
|
||||||
# print "Calling $self->{_cmdline}\n";
|
# 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
|
# Shutdown server
|
||||||
kill ('TERM', $pid);
|
kill ('TERM', $pid);
|
||||||
|
Loading…
Reference in New Issue
Block a user