Changeset

1579:9e784ddac236

mod_http_muc_log: Include charset in Content-Type header
author Kim Alvefur <zash@zash.se>
date Tue, 02 Dec 2014 14:14:38 +0100
parents 1578:a68ec7a2dc02
children 1580:63571115302f
files mod_http_muc_log/mod_http_muc_log.lua
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Thu Nov 20 20:01:07 2014 +0100
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Tue Dec 02 14:14:38 2014 +0100
@@ -237,7 +237,7 @@
 		end
 	until not next_day;
 
-	response.headers.content_type = "text/html";
+	response.headers.content_type = "text/html; charset=utf-8";
 	return dates_template{
 		host = module.host;
 		canonical = module:http_url() .. "/" .. path;
@@ -316,7 +316,7 @@
 		module:log("debug", "Previous message: %s", datetime.datetime(when));
 	end
 
-	response.headers.content_type = "text/html";
+	response.headers.content_type = "text/html; charset=utf-8";
 	return page_template{
 		canonical = module:http_url() .. "/" .. path;
 		host = module.host;
@@ -340,7 +340,7 @@
 		end
 	end
 
-	event.response.headers.content_type = "text/html";
+	event.response.headers.content_type = "text/html; charset=utf-8";
 	return room_list_template {
 		host = module.host;
 		canonical = module:http_url() .. "/";
@@ -365,7 +365,7 @@
 			end
 			module:log("debug", "Server cache hit");
 			response.headers.etag = etag;
-			response.headers.content_type = "text/html";
+			response.headers.content_type = "text/html; charset=utf-8";
 			return cached[1];
 		end
 
@@ -380,7 +380,7 @@
 			cache[ckey] = cached;
 		end
 
-		response.headers.content_type = "text/html";
+		response.headers.content_type = "text/html; charset=utf-8";
 		return render;
 	end
 end