Open suola opened 5 years ago
Indeed, that sounds like a logical suggestion.
FWIW, we vendored python-mimeparse
into Falcon as part of the 2.0 release as it was the last dependency.
In that light, a question arises what to do with your PR if we agree to go ahead with it. Maybe we should ask @dbtsai to take over maintenance of the project :thinking: Or whether we should fork our version.
Note that I'm reluctant to label this as a breaking change, as we don't seem to provide exact guarantees how subtypes are chosen.
Related:
python-mimeparse
(implemented as of Falcon 2.0) https://github.com/falconry/falcon/issues/1420python-mimeparse
/ its maintenance https://github.com/falconry/falcon/issues/1183
If server supports both 'type/subtype' and 'type/subtype;param=foo', a request which accepts 'type/subtype' should be served with 'type/subtype'. Currently the extra parameter is not taken into account when determining the preference of the two types, and preference is selected by order of the types.
Relevant PR in mimeparse:
https://github.com/dbtsai/python-mimeparse/pull/36