mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 00:19:01 +00:00
Fix NSEdoc generation problem
@field tag names in NSEdoc must be valid identifiers, so they cannot contain "-". As a general rule, anything that needs to be quoted like this: mytable["field-name"] is invalid. In this case, the ajp library had a field called "status-line", which caused NSEdoc generation to fail when it was finally documented. This change renames it to "status_line", which should fix the issue.
This commit is contained in:
@@ -46,7 +46,7 @@ action = function(host, port)
|
||||
return
|
||||
end
|
||||
|
||||
local result = { name = answer["status-line"]:match("^(.*)\r?\n$") }
|
||||
local result = { name = answer.status_line:match("^(.*)\r?\n$") }
|
||||
|
||||
local www_authenticate = answer.headers["www-authenticate"]
|
||||
if not www_authenticate then
|
||||
|
||||
@@ -83,7 +83,7 @@ action = function(host, port)
|
||||
helper:close()
|
||||
|
||||
if ( response ) then
|
||||
local output = response['status-line'] .. "\n" ..
|
||||
local output = response.status_line .. "\n" ..
|
||||
stdnse.strjoin("\n", response.rawheaders) ..
|
||||
(response.body and "\n\n" .. response.body or "")
|
||||
if ( arg_file ) then
|
||||
|
||||
Reference in New Issue
Block a user