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.

Bug in Mime::Type#parse for single media range with accept params

#5833

Mime::Type#parse doesn't split out the accept params from the media range when there is a single media range.

I.e. it incorrectly parses the valid HTTP_ACCEPTS header "/;0.9" to be "/;0.9" rather than "/"

Reported by Joel Chippindale · October 18th, 2010 @ 11:54 AM

State: new
Milestone: none
Assigned to: Piotr Sarnacki Piotr Sarnacki
Importance: Low

Activity

  1. Joel Chippindale
    Joel Chippindale
    • Tag changed from http accepts, actionpack to http accepts, actionpack, patch

    Attached patch for master

    October 18th, 2010 @ 12:07 PM

  2. Joel Chippindale
  3. Piotr Sarnacki
    Piotr Sarnacki
    • Assigned user set to Piotr Sarnacki
    • Importance changed from to Low

    Joel: why patch for master uses /;/ and patch for 2.3 uses ';' ?

    December 17th, 2010 @ 12:31 PM

  4. Joel Chippindale
    Joel Chippindale

    Piotr,

    The patch for master does not use /;/, rather they both use ';'

    If you look in the patch for master and for 2.3 the line is

    [Mime::Type.lookup(accept_header.split(';').first)]
    

    Or perhaps I have misunderstood your question

    J.

    February 7th, 2011 @ 12:38 PM

  5. Joel Chippindale
    Joel Chippindale

    This is still an issue with master, here is a new version of the patch which applies cleanly to current master.

    February 7th, 2011 @ 12:57 PM