Diff

mod_http_muc_log/mod_http_muc_log.lua @ 1576:91b91052e0e8

mod_http_muc_log: Send a HTML mime type with responses
author Kim Alvefur <zash@zash.se>
date Thu, 20 Nov 2014 19:50:43 +0100
parent 1575:464ed6bc5a73
child 1577:0a6974f2cb55
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Thu Nov 20 18:46:53 2014 +0100
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Thu Nov 20 19:50:43 2014 +0100
@@ -237,6 +237,7 @@
 		end
 	until not next_day;
 
+	response.headers.content_type = "text/html";
 	return dates_template{
 		host = module.host;
 		canonical = module:http_url() .. "/" .. path;
@@ -309,6 +310,7 @@
 		break;
 	end
 
+	response.headers.content_type = "text/html";
 	return page_template{
 		canonical = module:http_url() .. "/" .. path;
 		host = module.host;
@@ -331,6 +333,8 @@
 			}, i + 1;
 		end
 	end
+
+	event.response.headers.content_type = "text/html";
 	return room_list_template {
 		host = module.host;
 		canonical = module:http_url() .. "/";
@@ -355,6 +359,7 @@
 			end
 			module:log("debug", "Server cache hit");
 			response.headers.etag = etag;
+			response.headers.content_type = "text/html";
 			return cached[1];
 		end
 
@@ -369,6 +374,7 @@
 			cache[ckey] = cached;
 		end
 
+		response.headers.content_type = "text/html";
 		return render;
 	end
 end