From: Jo-Philipp Wich Date: Thu, 18 Sep 2014 09:29:30 +0000 (+0000) Subject: http: ensure .content() works by default X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a16c0c320086d3814abc52ddbf3d60b6b5a291a3;p=oweals%2Fluci.git http: ensure .content() works by default filehandler was always set, so the default handler was never being called. This led to calls to http.content() always returning nil. Signed-off-by: Karl Palsson --- diff --git a/modules/base/luasrc/http.lua b/modules/base/luasrc/http.lua index c53307a5a..e8430b727 100644 --- a/modules/base/luasrc/http.lua +++ b/modules/base/luasrc/http.lua @@ -42,8 +42,8 @@ function Request.__init__(self, env, sourcein, sinkerr) self.error = sinkerr - -- File handler - self.filehandler = function() end + -- File handler nil by default to let .content() work + self.filehandler = nil -- HTTP-Message table self.message = {