Changeset

11664:d83f8f44caea

mod_http_errors: Set status code 200 from root page It isn't quite an error.
author Kim Alvefur <zash@zash.se>
date Fri, 09 Jul 2021 22:06:58 +0200
parents 11663:04fa947784bc
children 11665:148075532021
files plugins/mod_http_errors.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http_errors.lua	Fri Jul 09 21:55:14 2021 +0200
+++ b/plugins/mod_http_errors.lua	Fri Jul 09 22:06:58 2021 +0200
@@ -98,6 +98,7 @@
 module:hook_object_event(server, "http-error", function (event)
 	local request, response = event.request, event.response;
 	if request and response and request.path == "/" and response.status_code == 404 then
+		response.status_code = 200;
 		response.headers.content_type = "text/html; charset=utf-8";
 		local message = messages["/"];
 		return render(html, {