From addda8dbe7e4669c4a860f16e5115618fdc61556 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 31 May 2017 22:27:29 +0200 Subject: [PATCH 1/2] use correct code for erropage instead of failing Sorry I didn't see this earlier --- httpserver-error.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/httpserver-error.lua b/httpserver-error.lua index 936482c..f7139cc 100644 --- a/httpserver-error.lua +++ b/httpserver-error.lua @@ -3,6 +3,7 @@ -- Author: Marcos Kirsch, Gregor Hartmann return function (connection, req, args) + req.code = args.code local statusString = dofile("httpserver-header.lc")(connection, req.code, "html", false, req.headers) connection:send("" .. req.code .. " - " .. statusString .. "

" .. req.code .. " - " .. statusString .. "

\r\n") end From c44deb097c27f84c8ec93984b4ac9dcfe0e318b9 Mon Sep 17 00:00:00 2001 From: Gregor Date: Thu, 1 Jun 2017 04:36:29 +0200 Subject: [PATCH 2/2] using args.code now --- httpserver-error.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/httpserver-error.lua b/httpserver-error.lua index f7139cc..cb70321 100644 --- a/httpserver-error.lua +++ b/httpserver-error.lua @@ -3,7 +3,6 @@ -- Author: Marcos Kirsch, Gregor Hartmann return function (connection, req, args) - req.code = args.code - local statusString = dofile("httpserver-header.lc")(connection, req.code, "html", false, req.headers) - connection:send("" .. req.code .. " - " .. statusString .. "

" .. req.code .. " - " .. statusString .. "

\r\n") + local statusString = dofile("httpserver-header.lc")(connection, args.code, "html", false, req.headers) + connection:send("" .. args.code .. " - " .. statusString .. "

" .. args.code .. " - " .. statusString .. "

\r\n") end