libwww-perl / libwww-perl/HTTP-Daemon
HTTP client hangs if zero-length file sent
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 6
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Using send_file_response with empty file suppress "Content-Length" header line, because "if $size" contstruction treated as false.
Then library succsessfully complete operation with RC_OK code, but HTTP client waits data from server, and timeout occured as a result.
Removing "if $size" resolve this problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/HTTP/Daemon.pm around line 546 and inspect send_file_response for the zero-size condition. Reproduce a response using an empty file and verify that the response includes Content-Length: 0 and the HTTP client completes without timing out.
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
- 45/100