mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Corrects handling of empty pipelines, expressed as nil. Fixes #538
This commit is contained in:
parent
6e75d69ee5
commit
88f6ddc596
1 changed files with 2 additions and 2 deletions
|
|
@ -1811,7 +1811,6 @@ end
|
|||
-- @return A list of responses, in the same order as the requests were queued.
|
||||
-- Each response is a table as described in the module documentation.
|
||||
function pipeline_go(host, port, all_requests)
|
||||
stdnse.debug1("Total number of pipelined requests: " .. #all_requests)
|
||||
local responses
|
||||
local response
|
||||
local partial
|
||||
|
|
@ -1819,10 +1818,11 @@ function pipeline_go(host, port, all_requests)
|
|||
responses = {}
|
||||
|
||||
-- Check for an empty request
|
||||
if (#all_requests == 0) then
|
||||
if (not all_requests or #all_requests == 0) then
|
||||
stdnse.debug1("Warning: empty set of requests passed to http.pipeline_go()")
|
||||
return responses
|
||||
end
|
||||
stdnse.debug1("Total number of pipelined requests: " .. #all_requests)
|
||||
|
||||
local socket, bopt
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue