summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2020-09-13 00:33:16 +0100
committerrofl0r <rofl0r@users.noreply.github.com>2020-09-13 00:35:38 +0100
commitbfe59856b2ebbb09e8fc36d6a3af5521eec2b98b (patch)
tree09d0600e4a654dec7d4b519a88ef3bc04e92b312
parent4847d8cdb3bfd9b30a10bfed848174250475a69b (diff)
tests/webclient: return error when HTTP status > 399
-rwxr-xr-xtests/scripts/webclient.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/scripts/webclient.pl b/tests/scripts/webclient.pl
index 25c0fb7..4dddb69 100755
--- a/tests/scripts/webclient.pl
+++ b/tests/scripts/webclient.pl
@@ -122,11 +122,16 @@ foreach my $document (@ARGV) {
print $remote $request;
+ $_ = <$remote>;
+ print; # /* HTTP/1.0 400 Bad Request */
+ my($errn) = ($_ =~ /HTTP\/\d\.\d (\d{3})/);
+
while (<$remote>) {
print;
}
close $remote;
+ exit($errn - 399) if($errn > 399);
}
exit(0);