header_ok: Fix typo(?) in HTTP response regular expression
This commit is contained in:
parent
211d59fccc
commit
2d4a93d5e7
1 changed files with 1 additions and 2 deletions
|
@ -3775,8 +3775,7 @@ sub nic_updateable {
|
||||||
sub header_ok {
|
sub header_ok {
|
||||||
my ($host, $line) = @_;
|
my ($host, $line) = @_;
|
||||||
$line =~ s/\r?\n.*//s;
|
$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)) {
|
if (!defined($code)) {
|
||||||
failed('updating %s: unexpected HTTP response: %s', $host, $line);
|
failed('updating %s: unexpected HTTP response: %s', $host, $line);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue