This project is archived and is in readonly mode.

#3240 ✓ stale
Manfred Stienstra

Internet Explorer Accept header

Reported by Manfred Stienstra | September 21st, 2009 @ 01:37 PM | in 2.3.10

Internet Explorer sends a rather retarded accept header, this causes Rails to respond with a whole slew of mime types before the sensible defaults: HTML and XML. For example:

repond_to do |format|
  format.html
  format.jpg do
    send_file @photo.public_path, :type => 'image/jpeg'
  end
end

Will return the JPEG instead of the HTML version on a regular request.

Attached is a patch which prepends HTML and XML to ActionController::Request#accepts when the user agent suggests Internet Explorer.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

Attachments

Tags

Pages