mirror of
https://github.com/nmap/nmap.git
synced 2026-06-20 07:29:59 +00:00
Skip over a single 100 Continue response, if present, before parsing the
real response in http.lua. This patch is by Patrik Karlsson.
This commit is contained in:
parent
696d5cb66d
commit
ee0fee26c0
1 changed files with 7 additions and 0 deletions
|
|
@ -1083,6 +1083,13 @@ function parseResult( response, options )
|
|||
if type(response) ~= "string" then return response end
|
||||
local result = {status=nil,["status-line"]=nil,header={},rawheader={},body=""}
|
||||
|
||||
-- See RFC 2616, sections 8.2.3 and 10.1.1, for the 100 Continue status.
|
||||
-- Sometimes a server will tell us to "go ahead" with a POST body before
|
||||
-- sending the real response. If we got one of those, skip over it.
|
||||
if response and response:match("^HTTP/%d.%d 100%s") then
|
||||
response = response:match("\r?\n\r?\n(.*)$")
|
||||
end
|
||||
|
||||
-- try and separate the head from the body
|
||||
local header, body
|
||||
if response and response:match( "\r?\n\r?\n" ) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue