mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Fixed a regexp escape sequence and shortened code.
This commit is contained in:
parent
8e145d6994
commit
ac55b3ca78
1 changed files with 1 additions and 2 deletions
|
|
@ -461,8 +461,7 @@ request = function( host, port, data, options )
|
|||
local last_header, match, key
|
||||
for number, line in ipairs( header or {} ) do
|
||||
if number == 1 then
|
||||
local code
|
||||
_, _, code = string.find( line, "HTTP/%d\.%d (%d+)")
|
||||
local code = line:match "HTTP/%d%.%d (%d+)";
|
||||
result.status = tonumber(code)
|
||||
if code then result["status-line"] = line end
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue