porkbun: Remove headers from HTTP response before processing

This commit is contained in:
Richard Hansen 2024-07-23 01:42:06 -04:00
parent c65d5c1254
commit 16b15ea089

View file

@ -6808,7 +6808,8 @@ sub nic_porkbun_update {
failed("updating %s: failed (%s)", $h, $reply);
next;
}
$reply =~ qr/{(?:[^{}]*|(?R))*}/mp;
(my $body = $reply) =~ s/^.*?\n\n//s;
$body =~ qr/{(?:[^{}]*|(?R))*}/mp;
my $response = eval { decode_json(${^MATCH}) };
if (!defined($response)) {
failed("%s -- Unexpected service response.", $h);