From 0d938dff59df0584b988a3714259adafee406bde Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 30 Apr 2010 10:33:25 +0000 Subject: [PATCH] Fixed: 500 internal error when browsing any Redmine page in Epiphany (#5401). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3702 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 66886ea0..c0d947c8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -108,8 +108,9 @@ class ApplicationController < ActionController::Base lang = find_language(User.current.language) end if lang.nil? && request.env['HTTP_ACCEPT_LANGUAGE'] - accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.downcase + accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first if !accept_lang.blank? + accept_lang = accept_lang.downcase lang = find_language(accept_lang) || find_language(accept_lang.split('-').first) end end