HeaderValue::to_str returns an error for valid unicode strings
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- api, networking
調査の方向性
まず HeaderValue::to_str と ToStrError の定義を見つけ、次にヘッダー値の文字列変換に関する既存のテストを確認します。変換の動作を変更する前に、HeaderValue の作成時にバイト列がどのように検証されるかを確認します。Unicode やタブを含む有効な UTF-8 が返され、無効な UTF-8 では引き続きエラーになり、ToStrError の名前の互換性が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
HeaderValue::to_str() returns an error if the header value contains any byte that's not "visible ASCII" (though this is misleading as \t is legal even though it's not visible). This is weird, it should just return a string if it contains a valid string regardless of the contents. We already know it doesn't contain illegal bytes (as that's checked upon creation of HeaderValue) so we don't need to check again, and there's no reason to disallow unicode characters when getting the string representation.
I think the right thing here is to just replace the implementation with std::str::from_utf8(), and replace ToStrError with a pub use std::str::Utf8Error as ToStrError for backwards compatibility.
Also see #519.
- 主要言語
- Rust
- スター
- 1.4k
- フォーク
- 382
- 平均マージ
- 10時間 32分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
element-hq/lk-jwt-service#248 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pact-foundation/pact-cli#154 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
antithesishq/bombadil#361 ·
メンテナーはふだん 1 日以内に返信
-
test(executor_l0): assert execute() TaskOutcome, not only bus events / 断言 execute() 返回的 TaskOutcomeオープンtype:debt
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
skaiy/wild_agentos#425 ·
メンテナーはふだん 1 日以内に返信