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

decoded_content fails to gunzip content if encountering unexpected end of file

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
perl
領域
api

調査の方向性

HTTP/Message.pm の 299 行目付近から始め、decoded_content が IO::Uncompress::Gunzip::gunzip のエラーと報告されている x-died レスポンス条件をどのように処理するかを調べます。gzip フッターが欠落したレスポンスを再現し、通常の gzip デコードを維持したまま decoded_content が失敗しなくなっていることを確認します。

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

説明

If the server doesn't send the last chunk which contains the gzip footer, the response fails to decode. All major browsers can handle this case fine and properly gunzip the content.

When tracking this down I found the response was a 200 OK, but LWP added this header:

 x-died  => "EOF when chunk header expected at .../5.20/lib/site_perl/5.20.0/Net/HTTP/Methods.pm line 525.",

And decoded_content was returning undef. When I added the raise_error option, I saw the error:

Can't gunzip content: unexpected end of file at .../lib/site_perl/5.20.0/HTTP/Message.pm line 299.

This should not cause a failure. And there does not appear to be anyway for end users to work around this without having to monkeypatch IO::Uncompress::Gunzip::gunzip.

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