diff options
author | Maxim Chernyak <max@bitsonnet.com> | 2010-09-18 04:08:48 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-18 20:49:51 +0200 |
commit | 20685d07ab5853457e1d11467f22ed42568e20f4 (patch) | |
tree | e8bebc097c3d45e15223d73c21f621a998c7b3f1 /actionpack/lib | |
parent | 154081f0f74988bdb8979f0447ff5816ab83d8fd (diff) | |
download | rails-20685d07ab5853457e1d11467f22ed42568e20f4.tar.gz rails-20685d07ab5853457e1d11467f22ed42568e20f4.tar.bz2 rails-20685d07ab5853457e1d11467f22ed42568e20f4.zip |
Fix header capitalization by explicitly upcasing first letter of every word, and avoiding capitalize. [#5636 state:resolved]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/head.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb index a5c9910d68..2b4a3b9392 100644 --- a/actionpack/lib/action_controller/metal/head.rb +++ b/actionpack/lib/action_controller/metal/head.rb @@ -22,7 +22,7 @@ module ActionController location = options.delete(:location) options.each do |key, value| - headers[key.to_s.dasherize.split(/-/).map { |v| v.capitalize }.join("-")] = value.to_s + headers[key.to_s.dasherize.split('-').each { |v| v[0] = v[0].chr.upcase }.join('-')] = value.to_s end self.status = status |