This project is archived and is in readonly mode.
default_charset = nil produces bogus content-type header
Reported by Sam Ruby | August 20th, 2008 @ 02:41 PM | in 2.x
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.
Comments and changes to this ticket
-
josh November 22nd, 2008 @ 07:01 PM
- State changed from new to stale
Staling out, let me know if its still an issue.
-
Frederick Cheung December 10th, 2008 @ 10:11 AM
Looks like this was fixed in f8f077945. Has that fixed it for you ?
-
Frederick Cheung December 11th, 2008 @ 04:33 PM
- State changed from stale to resolved
ActionController::Base.default_charset = nil seems to do the right thing now
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>