aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorNikita Afanasenko <nafanasenko@spbtv.com>2012-11-01 12:59:10 +0400
committerNikita Afanasenko <nafanasenko@spbtv.com>2012-11-01 15:15:46 +0400
commitd8c1404107501e131e4c7c653794768f5c461793 (patch)
tree08957ebdb7c23f8a3e755cccb8accd63ee9af3b1 /actionpack/lib/action_dispatch
parentb31ea0c240773c557a6c4e1a0e470a9d442406ee (diff)
downloadrails-d8c1404107501e131e4c7c653794768f5c461793.tar.gz
rails-d8c1404107501e131e4c7c653794768f5c461793.tar.bz2
rails-d8c1404107501e131e4c7c653794768f5c461793.zip
Fix #8086 (BestStandardsSupport rewrites app X-UA-Compatible header, now appends).
Now `BestStandardsSupport` middleware appends it's `X-UA-Compatible` value to app's value. Also test for `BestStandardsSupport` middleware added.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/middleware/best_standards_support.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
index 69adcc419f..d338996240 100644
--- a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
+++ b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
@@ -15,7 +15,13 @@ module ActionDispatch
def call(env)
status, headers, body = @app.call(env)
- headers["X-UA-Compatible"] = @header
+
+ if headers["X-UA-Compatible"] && @header
+ headers["X-UA-Compatible"] << "," << @header.to_s
+ else
+ headers["X-UA-Compatible"] = @header
+ end
+
[status, headers, body]
end
end