From f7f10b8a6120ecf893d6a0beb1d2c9ac25943cd3 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 19 Aug 2015 14:27:26 +0200 Subject: [PATCH] remove old hack to set content type to application/html This prevents attachments to be seen as something different than html content. For example, message/rfc822 for email was being replaced by application/html causing wrong application to be started on the client. --- app/controllers/application_controller.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 55cf2d61..20055838 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -19,13 +19,7 @@ class ApplicationController < ActionController::Base append_before_filter :set_group_view_by prepend_before_filter :login_required prepend_before_filter :enable_mobile_content_negotiation - after_filter :set_charset - - # By default, sets the charset to UTF-8 if it isn't already set - def set_charset - headers["Content-Type"] ||= "text/html; charset=UTF-8" - end - + def set_locale locale = params[:locale] # specifying a locale in the request takes precedence locale = locale || prefs.locale unless current_user.nil? # otherwise, the locale of the currently logged in user takes over