mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 04:49:02 +00:00
http library now uses make_buffer correctly.
This commit is contained in:
@@ -104,13 +104,13 @@ request = function( host, port, data, options )
|
||||
|
||||
local buffer = stdnse.make_buffer( socket, "\r?\n" )
|
||||
|
||||
local status, line, _
|
||||
local line, _
|
||||
local header, body = {}, {}
|
||||
|
||||
-- header loop
|
||||
while true do
|
||||
status, line = buffer()
|
||||
if (not status or line == "") then break end
|
||||
line = buffer()
|
||||
if not line then break end
|
||||
table.insert(header,line)
|
||||
end
|
||||
|
||||
@@ -168,4 +168,4 @@ get_default_timeout = function( nmap_timing )
|
||||
timeout.request = 7000
|
||||
end
|
||||
return timeout
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user