From 0abbfdab88397ffcb83f68551b6c03269ef099df Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 17 Apr 2018 18:40:57 +0200 Subject: mod_http_files: Correct cache insertion (fixes #1130) --- plugins/mod_http_files.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua index e477bafe..c5986e37 100644 --- a/plugins/mod_http_files.lua +++ b/plugins/mod_http_files.lua @@ -144,7 +144,7 @@ function serve(opts) if not data then return 403; end - cache[orig_path] = { data = data, content_type = mime_map.html; etag = etag; }; + cache:set(orig_path, { data = data, content_type = mime_map.html; etag = etag; }); response_headers.content_type = mime_map.html; else -- cgit v1.2.3 From 9a76ea7e31d5034607932ac304d89c40bf9c59bf Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 24 Apr 2018 22:58:46 +0100 Subject: util.events: Fix loop construct (negative step required) --- util/events.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/events.lua b/util/events.lua index e2943e44..6e13619c 100644 --- a/util/events.lua +++ b/util/events.lua @@ -125,7 +125,7 @@ local function new() w = wrappers[event_name]; end if not w then return; end - for i = #w, 1 do + for i = #w, 1, -1 do if w[i] == wrapper then t_remove(w, i); end -- cgit v1.2.3