diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-24 19:25:53 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-24 19:25:53 -0700 |
commit | 8097da93ccbfaec82e7785ded7b3e68c8248b32f (patch) | |
tree | e8f6b9ba9cee53d4f58dff31e432a35d92d0d722 /actionpack/lib/action_dispatch | |
parent | b1d4fb71bf890793133fab8e4226952865fd468b (diff) | |
download | rails-8097da93ccbfaec82e7785ded7b3e68c8248b32f.tar.gz rails-8097da93ccbfaec82e7785ded7b3e68c8248b32f.tar.bz2 rails-8097da93ccbfaec82e7785ded7b3e68c8248b32f.zip |
Don't want Rack's Content-Type default header though
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index a01114b730..b9db7a4508 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -41,7 +41,8 @@ module ActionDispatch # :nodoc: delegate :default_charset, :to => 'ActionController::Base' def initialize - super([], 200, DEFAULT_HEADERS) + super + @header = Rack::Utils::HeaderHash.new(DEFAULT_HEADERS) end # The response code of the request @@ -161,7 +162,7 @@ module ActionDispatch # :nodoc: end def assign_default_content_type_and_charset! - if type = headers['Content-Type'] + if type = headers['Content-Type'] || headers['type'] unless type =~ /charset=/ || sending_file? headers['Content-Type'] = "#{type}; charset=#{default_charset}" end |