gandi: Don't ignore HTTP response code
This commit is contained in:
parent
325eb10536
commit
12d5539abc
1 changed files with 2 additions and 2 deletions
|
@ -6924,7 +6924,7 @@ sub nic_gandi_update {
|
||||||
headers => $headers,
|
headers => $headers,
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
);
|
);
|
||||||
my $ok = header_ok($h, $reply);
|
next if !header_ok($h, $reply);
|
||||||
$reply =~ s/^.*?\n\n//s;
|
$reply =~ s/^.*?\n\n//s;
|
||||||
my $response = eval { decode_json($reply) };
|
my $response = eval { decode_json($reply) };
|
||||||
if (!defined($response)) {
|
if (!defined($response)) {
|
||||||
|
@ -6951,7 +6951,7 @@ sub nic_gandi_update {
|
||||||
method => 'PUT',
|
method => 'PUT',
|
||||||
data => $data,
|
data => $data,
|
||||||
);
|
);
|
||||||
$ok = header_ok($h, $reply);
|
my $ok = header_ok($h, $reply);
|
||||||
if ($ok) {
|
if ($ok) {
|
||||||
$config{$h}{'ip'} = $ip;
|
$config{$h}{'ip'} = $ip;
|
||||||
$config{$h}{'mtime'} = $now;
|
$config{$h}{'mtime'} = $now;
|
||||||
|
|
Loading…
Reference in a new issue