1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 17:39:03 +00:00

If the response is already a table (from an error in http.request) then do not

try to parse a result, instead return nil.  This fixes an error where we try to
index match as though response is a string.
This commit is contained in:
batrick
2009-08-15 14:53:28 +00:00
parent a2dcbb7cd5
commit d5748b1d83

View File

@@ -781,6 +781,7 @@ end
-- @param response A response received from the server for a request
-- @return A table with the values received from the server
function parseResult( response )
if type(response) ~= "string" then return response end
local result = {status=nil,["status-line"]=nil,header={},body=""}
-- try and separate the head from the body