This project is archived and is in readonly mode.
Improved handling for MIME types
Reported by Seth Fitzsimmons | December 14th, 2008 @ 07:23 PM | in 3.x
The first patch implements =~
in
Mime::Type
, to match the ==
implementation (for synonym handling).
The second uses Mime::JS
in place of explicit
references to text/javascript
.
The third changes the default javascript MIME type to
application/javascript
, as
text/javascript
is obsolete per RFC 4329, section
7.
Comments and changes to this ticket
-
Seth Fitzsimmons December 14th, 2008 @ 07:24 PM
- no changes were found...
-
Seth Fitzsimmons December 14th, 2008 @ 07:25 PM
These patches are also in the
javascript-mime-type
branch ofmojodna/rails
-
josh December 15th, 2008 @ 12:34 AM
- Assigned user set to josh
- State changed from new to open
0001 Looks good
0002 In those cases Accept header cases, "#{Mime::JS}, text/html, application/xml, ", why not change the own thing to [Mime::JS, Mime::HTML, Mime::XML].join(", ")
0003 I'm afraid make this change without some other support. I agree, we should do things according to the RFC, but I just want to make sure it won't have any other bad side effect.
-
Seth Fitzsimmons December 15th, 2008 @ 12:57 AM
0002 - I was being lazy and limiting the scope of my changes to javascript-related stuff.
0003 - I agree. This change is likely to affect lots of people that primarily use
text/javascript
(we identified this during a code review), so I expect lots of app tests to break (but to be easily fixed).I'm not sure how to go forward with it, but thought that it should at least be raised.
-
Repository December 15th, 2008 @ 06:24 PM
- State changed from open to resolved
(from [f36dafa492e3de66e624d81d6860f5f0536de6b0]) Implement Mime::Type.=~ to match all synonyms against arg [#1573 state:resolved] Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
Repository December 15th, 2008 @ 06:24 PM
(from [4966076d35d5d9510590d87d90dae8daf79b2069]) Use Mime::JS in place of explicit 'text/javascript' [#1573 state:resolved] Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
josh December 15th, 2008 @ 06:26 PM
- State changed from resolved to open
Did you intend to change "script type="text/javascript"" to "script type="application/javascript"" as well? Not sure I want to do that.
-
Seth Fitzsimmons December 15th, 2008 @ 06:52 PM
That was intentional, but I agree, potentially dangerous.
-
josh December 15th, 2008 @ 07:23 PM
Could you please update 0003 to still change the default type, but fix the output from the javascript tag helper.
Should be good to commit then.
-
Seth Fitzsimmons December 17th, 2008 @ 07:30 AM
Will do, but I'm a bit busy, so it might be a week or so until I get to it.
-
josh December 28th, 2008 @ 08:55 PM
- State changed from open to incomplete
-
josh August 19th, 2009 @ 03:44 PM
- Assigned user cleared.
-
Rohit Arondekar June 17th, 2010 @ 07:10 AM
Any updates to this ticket?
Seth, did you get around to editing the 3rd patch?
-
Santiago Pastorino February 2nd, 2011 @ 04:37 PM
- State changed from incomplete to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:37 PM
- State changed from open to stale
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>
People watching this ticket
Attachments
Tags
Referenced by
- 1573 Improved handling for MIME types (from [f36dafa492e3de66e624d81d6860f5f0536de6b0]) Impleme...
- 1573 Improved handling for MIME types (from [4966076d35d5d9510590d87d90dae8daf79b2069]) Use Mim...