python-hyper / python-hyper/rfc3986
Resolution result is not consistent with RFC 3986 when the base has "rootless" path without authority
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 189
- フォーク
- 38
- 平均マージ
- 13時間 36分
- マージ済み PR(30日)
- 1
説明
remove_dot_segments defined in RFC 3986 (section 5.2.4) sometimes add a leading slash when the base path is "rootless".
STEP OUTPUT BUFFER INPUT BUFFER
1 : foo/../baz
2E: foo /../baz
2C: /baz
2E: /baz
So, resolving ../baz against scheme:foo/bar should result in scheme:/baz.
However, output of this library differs from that.
$ python
Python 3.9.9 (main, Jan 10 2022, 18:52:39)
[GCC 11.2.1 20211127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from rfc3986 import uri_reference
>>> b = uri_reference('scheme:foo/bar')
>>> r = uri_reference('../baz')
>>> t = r.resolve_with(b)
>>> t
URIReference(scheme='scheme', authority=None, path='baz', query=None, fragment=None)
>>> t.unsplit()
'scheme:baz'
>>>
I think there should be special handling such as "when .. segment appears but output stack is empty, set prepend_slash flag" or something like that.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
RFC 3986 のセクション 5.2.4 の規則と、uri_reference、resolve_with、remove_dot_segments のエントリーポイントから始めます。scheme:foo/bar に対して ../baz を解決する例を再現します。既存の解決動作を維持したまま、結果が scheme:/baz に再結合されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100