Output not always matching the examples from RFC 7231 and RFC 9110
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the mimeparse.quality entry point and reproduce both examples from the issue. Compare the results with the media-negotiation rules and examples in RFC 7231 and RFC 9110; done means parameter ordering no longer changes the result when the inputs are semantically equivalent.
Written by the indexing model from the issue text.
Description
Although much of the negotiation is dependent on the specific server logic, it feels that the current implementation does not always follow the spirit of the HTTP semantics as detailed in RFC 7231 (now superseded by 9110, but 7231 has IMHO clearer examples) and RFC 9110.
Cf
>>> mimeparse.quality('text/html;level=3', 'text/*;q=0.3, text/html;q=0.7, text/html;level=1,text/html;level=2;q=0.4, */*;q=0.5')
0.7
>>> # So far so good. text/html;level=3 does not match the ranges for level=1 and level=2, so we get the generic value (0.7).
>>> # Now, just change the order of the example:
>>> mimeparse.quality('text/html;level=3', 'text/*;q=0.3, text/html;level=1, text/html;q=0.7, text/html;level=2;q=0.4, */*;q=0.5')
1.0
- Dominant language
- Python
- Stars
- 20
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from falconry/python-mimeparse
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
falconry/python-mimeparse#55 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
falconry/python-mimeparse#50 · 9 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
falconry/python-mimeparse#45 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
falconry/python-mimeparse#40 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
falconry/python-mimeparse#20 · 16 comments ·
All issues in falconry/python-mimeparse
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100