1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-07 23:19:02 +00:00

Fixed a big in the http library that cropped up while scanning multiple hosts at the same ip address. The reason this occurred is because the result would be cached based on the ip address, not the target name, so different vhosts on the same ip address would be considered the same by the cache.

This commit is contained in:
ron
2009-08-26 16:01:00 +00:00
parent 48035974b0
commit 46711fa004

View File

@@ -555,10 +555,9 @@ local function lookup_cache (method, host, port, path, options)
local no_cache = options.no_cache; -- do not save result
local no_cache_body = options.no_cache_body; -- do not save body
if type(host) == "table" then host = host.ip end
if type(port) == "table" then port = port.number end
local key = host..":"..port..":"..path;
local key = get_hostname(host)..":"..port..":"..path;
local mutex = nmap.mutex(tostring(lookup_cache)..key);
local state = {