diff --git a/src/wsapi/common.lua b/src/wsapi/common.lua index e059a8c..9be7ded 100644 --- a/src/wsapi/common.lua +++ b/src/wsapi/common.lua @@ -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) @@ -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)