infomaniak: Fail if the HTTP status code is not 2xx
This commit is contained in:
parent
7d99da77cc
commit
9ba583175a
1 changed files with 1 additions and 4 deletions
|
@ -8019,10 +8019,7 @@ sub nic_infomaniak_update {
|
||||||
login => $config{$h}{'login'},
|
login => $config{$h}{'login'},
|
||||||
password => $config{$h}{'password'},
|
password => $config{$h}{'password'},
|
||||||
);
|
);
|
||||||
if (!$reply) {
|
next if !header_ok($h, $reply);
|
||||||
failed("could not update %s", $h);
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
(my $body = $reply) =~ s/^.*?\n\n//s;
|
(my $body = $reply) =~ s/^.*?\n\n//s;
|
||||||
my ($status) = split(/ /, $body, 2);
|
my ($status) = split(/ /, $body, 2);
|
||||||
my ($ok, $msg) =
|
my ($ok, $msg) =
|
||||||
|
|
Loading…
Reference in a new issue