changeset 3595:00a848ede42d

mod_http_muc_log: Preserve ?query part in redirect
author Kim Alvefur <zash@zash.se>
date Mon, 13 May 2019 11:13:19 +0200
parents b66111f75e4b
children 6e529f53b3c3
files mod_http_muc_log/mod_http_muc_log.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Mon May 13 11:10:41 2019 +0200
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Mon May 13 11:13:19 2019 +0200
@@ -262,7 +262,7 @@
 	end
 	if date == "latest" then
 		local last_day = find_once(room, { reverse = true }, 3);
-		response.headers.location = datetime.date(last_day);
+		response.headers.location = url.build({ path = datetime.date(last_day), query = request.url.query });
 		return 303;
 	end
 	local day_start = datetime.parse(date.."T00:00:00Z");