diff mod_http_muc_log/mod_http_muc_log.lua @ 4938:bc8832c6696b

upstream merge
author Goffi <goffi@goffi.org>
date Wed, 11 May 2022 12:44:32 +0200
parents 13070c6a7ce8
children 479d618c9e6d
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Wed May 11 12:43:26 2022 +0200
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Wed May 11 12:44:32 2022 +0200
@@ -275,6 +275,10 @@
 	local request, response = event.request, event.response;
 
 	local room, date = path:match("^([^/]+)/([^/]*)/?$");
+	if not room then
+		response.headers.location = url.build({ path = path .. "/" });
+		return 303;
+	end
 	room = nodeprep(room);
 	if not room then
 		return 400;