Skip to content
  • Jonathan Rochkind's avatar
    2bad7eb1
    Raise more specific exception for invalid mime type from user-agent · 2bad7eb1
    Jonathan Rochkind authored
    To be able to distinguish from other kinds of `Mime::Type::InvalidMimeType` that may be raised by user or third-party code. It's only failure in parsing client-supplied content-types in ActionDispatch::Http::MimeNegotiation that should result in special handling.
    
    This also allows third-party error handling/tracking code to specifically target the new `ActionDispatch::Http::MimeNegotiation::InvalidType` for ignoring or other special handling, separate from  `Mime::Type::InvalidMimeType`
    
    This is a revision of #35753 in response to #37620 and discussion with @eugeneius
    2bad7eb1
    Raise more specific exception for invalid mime type from user-agent
    Jonathan Rochkind authored
    To be able to distinguish from other kinds of `Mime::Type::InvalidMimeType` that may be raised by user or third-party code. It's only failure in parsing client-supplied content-types in ActionDispatch::Http::MimeNegotiation that should result in special handling.
    
    This also allows third-party error handling/tracking code to specifically target the new `ActionDispatch::Http::MimeNegotiation::InvalidType` for ignoring or other special handling, separate from  `Mime::Type::InvalidMimeType`
    
    This is a revision of #35753 in response to #37620 and discussion with @eugeneius
Loading