From bfe59856b2ebbb09e8fc36d6a3af5521eec2b98b Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 13 Sep 2020 00:33:16 +0100 Subject: [PATCH] tests/webclient: return error when HTTP status > 399 --- tests/scripts/webclient.pl | 5 +++++ 1 file changed, 5 insertions(+) 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);