Merging 16820:16891 from trunk.
[rails.git] / app / controllers / application_controller.rb
index d9bc9e4f190bcf357193e626e93ce4116794604d..6dbe9165ca2593b20f5fff3c7e6c46f7469016e6 100644 (file)
@@ -143,9 +143,12 @@ class ApplicationController < ActionController::Base
   end
   
   def set_locale
+    response.header['Vary'] = 'Accept-Language'
+
     if @user
       if !@user.languages.empty?
         request.user_preferred_languages = @user.languages
+        response.header['Vary'] = '*'
       elsif !request.user_preferred_languages.empty?
         @user.languages = request.user_preferred_languages
         @user.save