From 393110baf12c98a4eab88571a5dbb672ff2771dd Mon Sep 17 00:00:00 2001 From: ron Date: Sat, 22 Aug 2009 22:23:03 +0000 Subject: [PATCH] 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. --- nselib/http.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nselib/http.lua b/nselib/http.lua index 503655d18..74df88951 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -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}