falconry / falconry/python-mimeparse

Output not always matching the examples from RFC 7231 and RFC 9110

オープン
#53 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
20
フォーク
12
PR マージ指標
30日以内にマージされた PR はありません

説明

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
```python
>>> 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
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。