mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 00:19:01 +00:00
Fix HTTP caching; every lookup was a cache miss. The problem was r16435,
where I added a check to make sure that a GET request would hit a cache entry for a HEAD request and vice versa. Because of a misnamed identifier, the test was always false.
This commit is contained in:
@@ -834,7 +834,7 @@ local function insert_cache (state, response)
|
||||
local record = {
|
||||
result = tcopy(response),
|
||||
last_used = os.time(),
|
||||
get = state.method,
|
||||
method = state.method,
|
||||
size = type(response.body) == "string" and #response.body or 0,
|
||||
};
|
||||
response = record.result; -- only modify copy
|
||||
|
||||
Reference in New Issue
Block a user