-
-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefer exact match without parameters to match with extra parameters. #1367
Comments
Indeed, that sounds like a logical suggestion. FWIW, we vendored |
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:
|
* feat: WiP reimplement mimeparse * feat(mediatypes): add some skeletons for mediatype parsing * chore: fix up after master merge * feat(mimeparse): wip doodles * feat(mediatypes): implement computation of best quality * feat(mediatypes): remove vendored mimeparse * docs: add a newsfragment for one of the issues * refactor: remove debug `print()`s * feat(mediatypes): add specialized mediatype/range errors, coverage * docs(newsfragments): add a newsfragment for #1367 * test(mediatypes): add more tests * feat(mediatypes): improve docstring, simplify behaviour * refactor(mediatypes): use a stricter type annotation * chore: remove an unused import * chore: fix docstring style violation D205 * chore(docs): apply review suggestion to `docs/ext/rfc.py` Co-authored-by: Federico Caselli <cfederico87@gmail.com> * docs(newsfragments): apply review suggestion for `docs/_newsfragments/864.breakingchange.rst` Co-authored-by: Federico Caselli <cfederico87@gmail.com> * refactor(mediatypes): address some review comments * perf(mediatypes): short-circuit if q is absent as per review comment * docs: explain how to mitigate a potentially breaking change * docs: add a note that we continue to maintain python-mimeparse * refactor(mediatypes): convert _MediaType and _MediaRange to dataclasses * fix(mediatypes): only use dataclass(slots=True) where supported (>=py310) * refactor(mediatypes): a yet another attempt to make dataclasses work with __slots__ --------- Co-authored-by: Federico Caselli <cfederico87@gmail.com>
@suola I know this has taken us a long time, but the issue has finally been fixed in 4.0.0. |
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:
falconry/python-mimeparse#36
The text was updated successfully, but these errors were encountered: