mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 19:09:01 +00:00
Fixed a bug where http.pipeline() would print a cryptic error if no requests were passed for it to perform. Changed it to print a warning if debugging is turned on, and return an empty set.
This commit is contained in:
@@ -618,6 +618,12 @@ pipeline = function(host, port, allReqs, options)
|
||||
local j, opts
|
||||
local opts
|
||||
local recv_status = true
|
||||
|
||||
-- Check for an empty request
|
||||
if(#allReqs == 0) then
|
||||
stdnse.print_debug(1, "Warning: empty set of requests passed to http.pipeline()")
|
||||
return {}
|
||||
end
|
||||
|
||||
opts = {connect_timeout=5000, request_timeout=3000, recv_before=false}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user