Skip to content

Commit

Permalink
fix(sailor): returns the correct 404 status for custom pages. Solves s…
Browse files Browse the repository at this point in the history
  • Loading branch information
soapdog committed Jun 20, 2017
1 parent 2aa1026 commit bca09fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sailor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bca09fb

Please sign in to comment.