1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 11:59:03 +00:00

fix redirect bug in head request where redirects would not be honored

This commit is contained in:
patrik
2014-04-26 13:34:48 +00:00
parent b09926a241
commit b440d9c064

View File

@@ -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)