`PartialEq`/`Ord` impls for `Authority` ignores case of userinfo part
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- networking
調査の方向性
http::uri::Authority の PartialEq と Ord の実装から始め、次にレポートに示されている userinfo_eq_case_sensitive テストで問題を再現してください。Authority の各コンポーネントがどのように解析され、比較されるかを確認してください。比較の動作が userinfo に関する RFC の区別に一致するか、または意図した動作が明確に文書化され、リグレッションテストによるカバレッジがあることを完了条件とします。
索引モデルが issue の本文から書いたものです。
説明
The comparison traits are implemented for http::uri::Authority by case-insensitively comparing the underlying authority string. This works fine if the authority component only consists of the host subcomponent (and optionally the port subcomponent), which is case-insensitive according to RFC 3986 Section 6.2.2.1.
However, the authority component may also contain a (deprecated according to [RFC 9110 Section 4.2.4.]) userinfo subcomponent, which is not specified to be case-insensitive and thus should be compared case-sensitively. In particular, the following test should pass:
use http::uri::Authority;
#[test]
fn userinfo_eq_case_sensitive() {
assert_ne!(
Authority::from_static("alice:supersecurepassword@example.com"),
Authority::from_static("Alice:SuperSecurePassword@example.com")
);
}
But this fails with the current implementation.
Is the behavior intentional? I understand that complicating the implementation for the deprecated subcomponent might not be desirable. But I think this should at least be documented if it's intentional.
[RFC 9110 Section 4.2.4.]: https://datatracker.ietf.org/doc/html/rfc9110#section-4.2.4
- 主要言語
- Rust
- スター
- 1.4k
- フォーク
- 378
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 5
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperium/http のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
似ている issue
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rocky-data/rocky#2181 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. オープンbot:ai-assisted component:indexer QA-roadmap status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
midnightntwrk/midnight-indexer#1557 ·