Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`PartialEq`/`Ord` impls for `Authority` ignores case of userinfo part

オープン
#625 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hyperium/http のほかの issue

hyperium/http の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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