1
0
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:
david
2010-07-21 20:36:03 +00:00
parent f08edac73a
commit acd64e2921

View File

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