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

Request::connect can build an invalid Request object

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

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

評価

難易度
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: (),
}

Rust Playground Link

Available options are:

主要言語
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 を短くまとめたダイジェスト。