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
Describe the bug
According to RFC2046 the charset in media types should be case insensitive. Whenever I pass a content-type where the charset does not match the case of the api spec I receive unsupported media type <...>. In case of a uppercase charset in the api spec even setting only the media type will fail
To Reproduce
Provide API Spec containing a content-type with charset like e.g. 'application/json; charset=UTF-8'
Send a request with content-type 'application/json; charset=utf-8' or 'application/json'
Provide API Spec containing a content-type with charset like e.g. 'application/json; charset=utf-8'
Send a request with content-type 'application/json; charset=UTF-8'
Actual behavior
Media Type validation fails with unsupported media type <...>
Expected behavior
Should accept charsets that only differ in casing
Describe the bug
According to RFC2046 the charset in media types should be case insensitive. Whenever I pass a
content-type
where the charset does not match the case of the api spec I receiveunsupported media type <...>
. In case of a uppercase charset in the api spec even setting only the media type will failTo Reproduce
Provide API Spec containing a
content-type
with charset like e.g. 'application/json; charset=UTF-8'Send a request with
content-type
'application/json; charset=utf-8' or 'application/json'Provide API Spec containing a
content-type
with charset like e.g. 'application/json; charset=utf-8'Send a request with
content-type
'application/json; charset=UTF-8'Actual behavior
Media Type validation fails with
unsupported media type <...>
Expected behavior
Should accept charsets that only differ in casing
Examples and context
Providing the
content-type
as 'application/json; charset=UTF-8' in the spec will also cause API calls withcontent-type
:application/json
to fail.The text was updated successfully, but these errors were encountered: