From acd64e29214e88e2f16c0492adaf1f3b253f296d Mon Sep 17 00:00:00 2001 From: david Date: Wed, 21 Jul 2010 20:36:03 +0000 Subject: [PATCH] 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. --- nselib/http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/http.lua b/nselib/http.lua index 305edee59..6a7925ecf 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -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