Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3058

Show
Ignore:
Timestamp:
11/16/05 09:05:04 (3 years ago)
Author:
bitsweat
Message:

fewer objects, no loop in convert_content_type. Closes #2883.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r3057 r3058  
    11*SVN* 
    22 
    3 * Performance tweaks: use Set instead of Array to speed up prototype helper include? calls.  Avoid logging code if logger is nil.  Inline commonly-called template presence checks.  #2880, #2881, #2882 [Stefan Kaes] 
     3* Performance tweaks: use Set instead of Array to speed up prototype helper include? calls.  Avoid logging code if logger is nil.  Inline commonly-called template presence checks.  #2880, #2881, #2882, #2883 [Stefan Kaes] 
    44 
    55* MemCache store may be given multiple addresses.  #2869 [Ryan Carver <ryan@fivesevensix.com>] 
  • trunk/actionpack/lib/action_controller/cgi_process.rb

    r2958 r3058  
    184184    private 
    185185      def convert_content_type!(headers) 
    186         %w( Content-Type Content-type content-type ).each do |ct| 
    187           if headers[ct] 
    188             headers["type"] = headers[ct] 
    189             headers.delete(ct) 
    190           end 
     186        if header = headers.delete("Content-Type") 
     187          headers["type"] = header 
     188        end 
     189        if header = headers.delete("Content-type") 
     190          headers["type"] = header 
     191        end 
     192        if header = headers.delete("content-type") 
     193          headers["type"] = header 
    191194        end 
    192195      end