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

Changeset 6155

Show
Ignore:
Timestamp:
02/15/07 18:52:08 (2 years ago)
Author:
david
Message:

In tests, content_type can be nil, which would disturb accepts/format

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/request.rb

    r6057 r6155  
    7979      @accepts ||= 
    8080        if @env['HTTP_ACCEPT'].to_s.strip.empty? 
    81           [ content_type, Mime::ALL ] 
     81          [ content_type, Mime::ALL ].compact # make sure content_type being nil is not included 
    8282        else 
    8383          Mime::Type.parse(@env['HTTP_ACCEPT'])