diff options
author | Edward Anderson <nilbus@nilbus.com> | 2013-01-12 10:33:01 -0500 |
---|---|---|
committer | Edward Anderson <nilbus@nilbus.com> | 2013-01-15 19:16:08 -0500 |
commit | 7925884b5e03127b40f4fd8987b8be115a406c4a (patch) | |
tree | 923562fb1525b21383000d7700eced6cd832e0a8 /actionpack/lib/action_dispatch/middleware | |
parent | 8492396e9c1fe21036783d9785ed42c27dee9201 (diff) | |
download | rails-7925884b5e03127b40f4fd8987b8be115a406c4a.tar.gz rails-7925884b5e03127b40f4fd8987b8be115a406c4a.tar.bz2 rails-7925884b5e03127b40f4fd8987b8be115a406c4a.zip |
Remove header bloat introduced by BestStandardsSupport middleware
The same headers were being duplicated on every request.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/best_standards_support.rb | 4 |
1 files changed, 3 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 d338996240..94efeb79fa 100644 --- a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb +++ b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb @@ -17,7 +17,9 @@ module ActionDispatch status, headers, body = @app.call(env) if headers["X-UA-Compatible"] && @header - headers["X-UA-Compatible"] << "," << @header.to_s + unless headers["X-UA-Compatible"][@header] + headers["X-UA-Compatible"] << "," << @header.to_s + end else headers["X-UA-Compatible"] = @header end |