On 7/14/07, Gabe da Silveira <[EMAIL PROTECTED]> wrote:
> On 7/12/07, Michael Koziarski <[EMAIL PROTECTED]> wrote:

> > As for the patch, you should probably use the lookup function in
> > mime.rb instead of regexp matching. That'll remove the false positives
>
> Agreed, this will be an improvement.  I'm checking out mime.rb now to
> figure out how to do this.

Okay, I've gone in and made the patch using the lookup function.
However, after looking closer at the situation, I believe the original
patch is better for a number of reasons which I've detailed in the
patch comments.

I don't believe there is any possibilty of a false positive, because
the ONLY type that should be parsed as HTML is text/html.  Everything
else (including XHTML) should be parsed as XML.  There are numerous
types of XML, including user-defined XML formats, all of which use a
standard mime_type convention of application/type+xml, so there is no
way to get around the use of a regexp.  Meanwhile, the lookup function
requires Rails-known mime types, even though the developer can specify
any content-type he wants.

So far it seems a few people are interested in the patch.  I haven't
marked it verified, is the rule for that you have to get the explicit
three +1s?  Should I go on rails-contrib?  I would think the mailing
list gets more eyes, but I'm ready to do whatever it takes to get this
puppy committed.

-- 
Gabe da Silveira
http://darwinweb.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to