From bca09fbe54a8805273aa19a62b2d4dfddd229ca5 Mon Sep 17 00:00:00 2001 From: andre alves garzia Date: Tue, 20 Jun 2017 19:22:06 -0300 Subject: [PATCH] fix(sailor): returns the correct 404 status for custom pages. Solves #137 --- src/sailor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sailor.lua b/src/sailor.lua index 8e07f36..cbf5031 100755 --- a/src/sailor.lua +++ b/src/sailor.lua @@ -145,7 +145,7 @@ function sailor.route(page) if sailor.conf.default_error404 and sailor.conf.default_error404 ~= '' then page.controller_view_path = nil _, res = xpcall(function () page:render(sailor.conf.default_error404) end, error_handler) - return res or httpd.OK or page.r.status or 200 + return res or httpd.OK or page.r.status or 404 end page.r.status = 404 return res or page.r.status