mirror of
https://github.com/nmap/nmap.git
synced 2026-08-28 12:31:12 +00:00
fix redirect bug in head request where redirects would not be honored
This commit is contained in:
parent
b09926a241
commit
b440d9c064
1 changed files with 2 additions and 2 deletions
|
|
@ -1557,9 +1557,9 @@ function head(host, port, path, options)
|
|||
local response, state, location
|
||||
local u = { host = host, port = port, path = path }
|
||||
repeat
|
||||
response, state = lookup_cache("HEAD", host, port, path, options);
|
||||
response, state = lookup_cache("HEAD", u.host, u.port, u.path, options);
|
||||
if response == nil then
|
||||
response = generic_request(host, port, "HEAD", path, options)
|
||||
response = generic_request(u.host, u.port, "HEAD", u.path, options)
|
||||
insert_cache(state, response);
|
||||
end
|
||||
u = parse_redirect(host, port, path, response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue