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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user