-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
at the moment, we do not throw an explicit exception when an unsupported media type is used either in code or by users.
We should validate this when parsing and throw an explicit error to the user.
This will require changes across the codebase were we rely on parsing returning null and the logic is retrying parsing in a different way (a value from content-type or format parameter)
Also important to not allow java default accept header "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" which is sets by sun.net.www.protocol.http.HttpURLConnection
Make / parsing strict to return JSON
Unknown parameters for a known media type should also throw an exception
Validation of charset parameter should be enforced. Deprecation warnings for charset should be emitted in 7.x
comments #61427 (comment)
relates #61427