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

Extraction of authorization from URL needs to happen sooner [rt.cpan.org #89968]

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
perl
領域
networking

調査の方向性

まず HTTP::Request と、issue に記載されている既存の LWP::UserAgent の処理を読み、次に GET が URL からリクエストを構築する方法を確認します。認証情報が Authorization ヘッダーに抽出され、リクエスト行から削除されて、HTTP::Request->as_string が示されている形式を生成するようになれば、変更は完了です。

索引モデルが issue の本文から書いたものです。

説明

Migrated from rt.cpan.org#89968 (status was 'new')

Requestors:

From [email protected] on 2013-11-01 22:12:56:

The HTTP::Request + LWP::UserAgent pair of modules correctly handles the case

  my $resp = $ua->request( GET "http://user:pass@host/path" );

but despite that the HTTP basic auth header is a property of the HTTP::Request itself, this appears to be being handled entirely by LWP rather than HTTP::Request.

It would be more useful for other HTTP useragents which are based on HTTP::Message objects if this were handled within HTTP::Request itself. I feel that therefore the behaviour ought to be somewhere that after

  my $req = GET "http://user:pass@host/path";

We now have the Authorization header correctly set in $req and the user:pass@ removed from the embedded URL in the first request line. Ideally then at this point

  print $req->as_string;

should yield

  GET /path HTTP/1.1
  Host: host
  Authorization: Basic dXNlcjpwYXNz
  ...

-- 

Paul Evans

From [email protected] on 2013-11-06 17:06:11:

For context see also

  https://rt.cpan.org/Ticket/Display.html?id=89775

-- 

Paul Evans
主要言語
Perl
スター
32
フォーク
62
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

libwww-perl/HTTP-Message のほかの issue

libwww-perl/HTTP-Message の issue をすべて見る

似ている issue

Perl の issue をもっと見る

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

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