cleanup, error pages

This commit is contained in:
root
2026-06-16 08:46:54 +00:00
parent f2a3503ac3
commit dff1959341
6 changed files with 35 additions and 62 deletions
+4
View File
@@ -112,6 +112,10 @@ bool render_wasm_error_page(Request& request, String config_key, s32 status_code
request.call.remove("error");
return(false);
}
// Rendering the error-page unit set the response to its own (200) status;
// re-assert the error status + html content-type so the client sees e.g. 500.
request.set_status(status_code, status_reason);
request.header["Content-Type"] = first(request.server->config["CONTENT_TYPE"], "text/html; charset=utf-8");
print(html);
return(true);
}