libwww-perl / libwww-perl/Net-HTTP

die creates new warning on missing newline

Open
#74 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

Got this report via email:


Using Net::HTTP::Methods I very often receive errors:

Use of uninitialized value $line in concatenation (.) or string at /opt/perl5.28.2/lib/site_perl/5.28.2/Net/HTTP/Methods.pm line 534.
Use of uninitialized value $line in concatenation (.) or string at /opt/perl5.28.2/lib/site_perl/5.28.2/Net/HTTP/Methods.pm line 534.

            die "Missing newline after chunk data: '$line'"
                if !defined($line) || $line ne "";

When $line is undefined it tried to print it in die statement.

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 Net/HTTP/Methods.pm around line 534, where the missing-newline error is reported and the undefined $line value is interpolated. Reproduce or inspect that path and verify the missing-newline case no longer emits an uninitialized-value warning while still reporting the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
networking
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.