mjackson / rack-accept

HTTP Accept* for Ruby/Rack
http://mjackson.github.com/rack-accept
47 stars 16 forks source link

Fixed parsing of media_types including dots #5

Closed JosephHalter closed 13 years ago

JosephHalter commented 13 years ago

There was a bug in media_types parsing for media types including a dot. Here are examples of valid media types which were not recognized properly by rack-accept:

audio/vnd.rn-realaudio application/vnd.mozilla.xul+xml

Examples taken from http://en.wikipedia.org/wiki/Internet_media_type I had to change the regexp in parse_media_type to fix it, I've added a test for it, please merge.

mjackson commented 13 years ago

Thanks for this patch!