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:
parent
da23769b68
commit
b6a7c44d39
1 changed files with 1 additions and 1 deletions
|
@ -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') {
|
||||||
|
|
Loading…
Reference in a new issue