diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/cgi_process.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 51a0433a89..812899b327 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -183,11 +183,14 @@ end_msg private def convert_content_type!(headers) - %w( Content-Type Content-type content-type ).each do |ct| - if headers[ct] - headers["type"] = headers[ct] - headers.delete(ct) - end + if header = headers.delete("Content-Type") + headers["type"] = header + end + if header = headers.delete("Content-type") + headers["type"] = header + end + if header = headers.delete("content-type") + headers["type"] = header end end end |