falcon: Custom media handlers: Unexpected issue when providing custom json handler
This is in falcon-2.0
Look at the documentation here for using rapidjson for encoding/decoding json. By providing:
extra_handlers={'application/json': json_handler} we are still left with the default handler for content-type application-json; charset=UTF-8. This results in an unexpected behaviour when some client library (e.g. Retrofit for Android) includes the charset in the header.
While the documentation should be updated, the expected behaviour is that if the handler for application/json is updated - it should also update the handler for variant with charset (or at least throw a warning) otherwise there is a possibility of hidden bugs.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (18 by maintainers)
I’ll open a new issue regarding this, since it’s only tangentially related to this one
Ok sure.