1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 18:09:01 +00:00

Adding a few comments on some functions

This commit is contained in:
joao
2009-09-15 02:46:58 +00:00
parent b0346e22b9
commit b9d1591739

View File

@@ -491,6 +491,12 @@ local function splitResults( response, methods )
return responses, parsingOpts
end
--- Tries to get the next response from a string with multiple responses
--
-- @arg full_response The full response (as received by pipeline() function)
-- @arg method The method used for this request
-- @return response The next single response
-- @return left_response The left data on the response string
function getNextResult( full_response, method )
local header = ""
local body = ""
@@ -541,6 +547,10 @@ function getNextResult( full_response, method )
return response, full_response
end
--- Checks the header for chunked body encoding
--
-- @arg header The header
-- @return boolean True if the body is chunked, false if not
function isChunked( header )
header = stdnse.strsplit( "\r?\n", header )
local encoding = nil
@@ -552,6 +562,10 @@ function isChunked( header )
return false
end
--- Get body length
--
-- @arg header The header
-- @return The body length (nil if not found)
function getLength( header )
header = stdnse.strsplit( "\r?\n", header )
local length = nil