Request::connect can build an invalid Request object
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- networking
調査の方向性
まず Request::connect と Uri::authority のドキュメントを読み、次に例に示されている body() 呼び出しを追跡します。意図されている RFC 2817 の動作を特定し、CONNECT リクエストの構築によって無効な完全な URI を保持できないことを検証します。
索引モデルが issue の本文から書いたものです。
説明
According to RFC2817, Section 5.2 the URI of the CONNECT method should be only the authority part:
A CONNECT method requests that a proxy establish a tunnel connection
on its behalf. The Request-URI portion of the Request-Line is always
an 'authority' as defined by URI Generic Syntax [2], which is to say
the host name and port number destination of the requested connection
separated by a colon:
However with the http 0.2.4 crate it is possible to create a CONNECT request with an invalid URI part.
Example:
use http::Request;
use http::Uri;
fn main() {
let u: Uri = "http://example.org/index.html".parse().unwrap();
let r = Request::connect(u).body(()).unwrap();
dbg!(&r);
}
Output:
[src/main.rs:7] &r = Request {
method: CONNECT,
uri: http://example.org/index.html,
version: HTTP/1.1,
headers: {},
body: (),
}
Available options are:
- Keep it as is.
- When building a
CONNECTrequest, take only the authority part of the URI and ensure it has the correct value for the destination port. - Return a
Uri(uri::InvalidUri)error when callingbody().
- 主要言語
- 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 CLI custom-model
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rust-bitcoin/rust-bitcoin#6930 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100