The first path segment is unexpectedly interpreted as an authority after normalization
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
uri_reference() エントリーポイントから開始し、issue の例と、そこで参照されている RFC 3986 の規則を使って normalize()、resolve_with()、unsplit() を追跡します。authority が存在しない場合に先頭の二重スラッシュをどのように扱うべきかを、issue #84 で指摘されている相互作用も含めて特定します。意図した動作が仕様として定義され、例が最初のパスセグメントを authority として再解釈しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
scheme:/..///barhas scheme="scheme", authority=None, path=/..///bar.
However, after normalization, it has scheme="scheme", authority="bar".- Consider t1 as an IRI
..///barresolved againstscheme:.
t1 should have scheme="scheme"and authority=None(since..///bardoes not contain authority).
However, resulting string isscheme://bar, it has authority=bar.
And some more examples:
$ 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:')
>>> r1 = uri_reference('..///bar')
>>> t1 = r1.resolve_with(b)
>>> t1
URIReference(scheme='scheme', authority=None, path='//bar', query=None, fragment=None)
>>> t1.unsplit()
'scheme://bar'
>>> r2 = uri_reference('/..///bar')
>>> r2.resolve_with(b)
URIReference(scheme='scheme', authority=None, path='//bar', query=None, fragment=None)
>>> uri_reference('scheme:/..///bar').normalize()
URIReference(scheme='scheme', authority=None, path='//bar', query=None, fragment=None)
>>> uri_reference('scheme:/..///bar').normalize().unsplit()
'scheme://bar'
I'm not sure how this should handled.
Collapsing the // at the beginning is not explicitly allowed by RFC 3986, so I think the normalization and the resolution cannot produce valid output and should fail in this case.
(But RFC 3986 does not seem to state that they can fail!)
This can caused by normalization during resolution, so #84 may also be affected by this issue.
- 主要言語
- Python
- スター
- 189
- フォーク
- 43
- 平均マージ
- 12時間 14分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-hyper/rfc3986 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
python-hyper/rfc3986#164 ·
-
ParseResultBytes.unsplit() raises AttributeError for a reference without an authority対応中かも @mayuriphad が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
python-hyper/rfc3986#163 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
python-hyper/rfc3986#138 · コメント 1 件 ·
-
sdist is missing `tox.ini`再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
python-hyper/rfc3986#129 ·
-
wrong parseオープン
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
python-hyper/rfc3986#128 ·
python-hyper/rfc3986 の issue をすべて見る
似ている issue
-
bug P2 rust
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jscott3201/rusty-bacnet#2085 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
evarness-ai/iris-harness#401 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
sistemicorp/scripts#62 ·
-
area/mac help wanted needs-qa
難易度 1/5 1時間未満 初心者へのやさしさ 76/100