Ensure header_ok accept any 2xx return code

Adapt `header_ok` to return success for any HTTP 2xx code.

Signed-off-by: Jimmy Thrasibule <jimmy.thrasibule@orange.com>
Reviewed-by: Richard Hansen <rhansen@rhansen.org>
This commit is contained in:
Jimmy Thrasibule 2020-07-16 11:18:44 +02:00 committed by Richard Hansen
parent da23769b68
commit b6a7c44d39

View file

@ -2594,7 +2594,7 @@ sub header_ok {
if ($line =~ m%^s*HTTP/1.*\s+(\d+)%i) { if ($line =~ m%^s*HTTP/1.*\s+(\d+)%i) {
my $result = $1; my $result = $1;
if ($result eq '200') { if ($result =~ m/^2\d\d$/) {
$ok = 1; $ok = 1;
} elsif ($result eq '401') { } elsif ($result eq '401') {