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.jpg do
    send_file @photo.public_path, :type => 'image/jpeg'

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 »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>