You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
media-type = type "/" subtype *( OWS ";" OWS parameter )
type = token
subtype = token
The type/subtype MAY be followed by parameters in the form of name=value pairs.
parameter = token "=" ( token / quoted-string )
A parameter value that matches the token production can be transmitted either as a token or within a quoted-string. The quoted and unquoted values are equivalent. For example, the following examples are all equivalent, but the first is preferred for consistency:
The text was updated successfully, but these errors were encountered:
bkdotcom
changed the title
getMediaTypeParams doesn't handle quoted-string values
getMediaTypeParams() doesn't handle quoted-string values or whitespace
Aug 21, 2024
bkdotcom
changed the title
getMediaTypeParams() doesn't handle quoted-string values or whitespace
getMediaTypeParams() doesn't handle quoted-string values
Aug 21, 2024
https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.1
Contrived example
application/json;charSet="UTF-8"; FOO = "b; a\\"r"
(there shouldn't be whitespace around the "=", but we can handle it)
expected:
actual
Undefined array key 1
something like this
fix could go futher and strtolower the value if key is charset
related
The text was updated successfully, but these errors were encountered: