dnsexit2: Delete redundant HTTP status code check
`header_ok` already checks for non-2xx codes.
This commit is contained in:
parent
3d894364bf
commit
073fe5a51d
1 changed files with 0 additions and 8 deletions
|
@ -4026,14 +4026,6 @@ sub dnsexit2_update_host {
|
||||||
failed("updating %s: Could not connect to %s", $h, $url);
|
failed("updating %s: Could not connect to %s", $h, $url);
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
(my $http_status) = ($reply =~ m%^s*HTTP/.*\s+(\d+)%i);
|
|
||||||
debug("HTTP response code: %s", $http_status);
|
|
||||||
if ($http_status ne '200') {
|
|
||||||
failed("Failed to update Host\n%s", $h);
|
|
||||||
failed("HTTP response code\n%s", $http_status);
|
|
||||||
failed("Full reply\n%s", $reply) unless opt('verbose');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
(my $body = $reply) =~ s/^.*?\r?\n\r?\n//s;
|
(my $body = $reply) =~ s/^.*?\r?\n\r?\n//s;
|
||||||
my $response = eval { decode_json($body); };
|
my $response = eval { decode_json($body); };
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
|
|
Loading…
Reference in a new issue