Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

default_charset = nil produces bogus content-type header

#869

To work around bugs in IE7, it is necessary to sometimes not send a charset parameter in a content-type header. See http://golem.ph.utexas.edu/~dist... for an example.

Setting ActionController.default_charset = nil would seem to address this, but unfortunately it results in a header such as the following to be sent:

Content-Type: application/xhtml+xml; charset=

The suggested fix is to make ActionController::AbstractResponse#charset= match the behavior of content_type= and not insert the charset parameter into the content type if nil.

An alternate fix (one that would be less failsafe) would be to modify AbstractResponse#assign_default_content_type_and_charset to not set response.charset if the default is nil.

Reported by Sam Ruby · August 20th, 2008 @ 02:41 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to stale

    Staling out, let me know if its still an issue.

    November 22nd, 2008 @ 07:01 PM

  2. Frederick Cheung
    Frederick Cheung

    Looks like this was fixed in f8f077945. Has that fixed it for you ?

    December 10th, 2008 @ 10:11 AM

  3. Frederick Cheung
    Frederick Cheung
    • State changed from stale to resolved

    ActionController::Base.default_charset = nil seems to do the right thing now

    December 11th, 2008 @ 04:33 PM