freemyip: Check entire result body, not just first line
This is simpler, and should be more resilient to bugs.
This commit is contained in:
parent
3ece2017e9
commit
1195a40c45
1 changed files with 2 additions and 4 deletions
|
@ -6425,10 +6425,8 @@ sub nic_freemyip_update {
|
||||||
}
|
}
|
||||||
next if !header_ok($h, $reply);
|
next if !header_ok($h, $reply);
|
||||||
(my $body = $reply) =~ s/^.*?\n\n//s;
|
(my $body = $reply) =~ s/^.*?\n\n//s;
|
||||||
my @reply = split(/\n/, $body);
|
if ($body !~ /OK/) {
|
||||||
my $returned = pop(@reply);
|
failed("$h: Server said: $body");
|
||||||
if ($returned !~ /OK/) {
|
|
||||||
failed("$h: Server said: $returned");
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$config{$h}{'ip'} = $ip;
|
$config{$h}{'ip'} = $ip;
|
||||||
|
|
Loading…
Reference in a new issue