libwww-perl / libwww-perl/Net-HTTP

Net::HTTP::NB may forget state when reading chunk [rt.cpan.org #20930]

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
20
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Migrated from rt.cpan.org#20930 (status was 'open')

Requestors:

  • hiranotaka@zng.info

From hiranotaka@zng.info on 2006-08-10 06:07:05:

When Net::HTTP::NB::read_entity_body reads chunk,
if Net::HTTP::NB::my_read raises "Multi-read\n" exception,
${*$self}{'http_chunked'} remains an old value,
which should become a new value, $chunked.

From hiranotaka@zng.info on 2006-08-10 06:20:11:

Well, i should correct the report as following:

When Net::HTTP::NB::read_entity_body reads "http_first_body",
if Net::HTTP::NB::my_read raises "Multi-read\n" exception,
${*$self}{'http_chunked'} remains undefined,
which should become $chunked.

From hiranotaka@zng.info on 2006-08-10 06:31:46:

patch

*** Methods.pm.orig     2005-12-07 19:01:37.000000000 +0900
--- Methods.pm  2006-08-10 15:27:13.000000000 +0900
***************
*** 415,420 ****
--- 415,422 ----

            # Read until EOF
        }
+       ${*$self}{'http_chunked'} = $chunked;
+       ${*$self}{'http_bytes'} = $bytes;
      }
      else {
        $chunked = ${*$self}{'http_chunked'};

From ether@cpan.org on 2017-01-25 21:40:33:

migrated queues: libwww-perl -> Net-HTTP

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Methods.pm at Net::HTTP::NB::read_entity_body, then trace the my_read path for the http_first_body case and the Multi-read exception. Done means the http_chunked and http_bytes state is updated to the current values shown in the proposed patch, with the reported state transition verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.