From 2d4a93d5e79964beaf0ff5a3793c0ce6acb089a3 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 14 May 2024 23:51:37 -0400 Subject: [PATCH] header_ok: Fix typo(?) in HTTP response regular expression --- ddclient.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index 84d8e3d..eaf40e8 100755 --- a/ddclient.in +++ b/ddclient.in @@ -3775,8 +3775,7 @@ sub nic_updateable { sub header_ok { my ($host, $line) = @_; $line =~ s/\r?\n.*//s; - # TODO: What is this leading /s*/? Is it a typo of /\s*/? - my ($code, $msg) = ($line =~ qr%^s*HTTP/.*\s+(\d+)\s*(?:\s+([^\s].*))?$%i); + my ($code, $msg) = ($line =~ qr%^\s*HTTP/.*\s+(\d+)\s*(?:\s+([^\s].*))?$%i); if (!defined($code)) { failed('updating %s: unexpected HTTP response: %s', $host, $line); return 0;