Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wsapi/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function _M.send_error(out, err, msg, out_method, err_method, http_response)
local write_err = err[err_method or "write"]
write_err(err, "WSAPI error in application: " .. tostring(msg) .. "\n")
local msg = _M.error_html(msg)
local status, headers, res_iter = "500 Internal Server Error", {
local status, headers, res_iter = 500, {
["Content-Type"] = "text/html",
["Content-Length"] = #msg
}, make_iterator(msg)
Expand All @@ -250,7 +250,7 @@ end
function _M.send_404(out, msg, out_method, http_response)
local write = out[out_method or "write"]
local msg = _M.status_404_html(msg)
local status, headers, res_iter = "404 Not Found", {
local status, headers, res_iter = 404, {
["Content-Type"] = "text/html",
["Content-Length"] = #msg
}, make_iterator(msg)
Expand Down