Fix Java TLS socket reads for chunked HTTPS response bodies
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 56/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- networking
Direção de pesquisa
Start with PerlOnJava’s Java-backed IO::Socket::SSL shim and the socket read path used by Net::HTTP::NB; the issue does not name source files or tests. Trace how the Java SSLSocket handles reads after response headers and compare it with the native Perl behavior. Add a deterministic local TLS test serving a chunked body; done means PerlOnJava reads the full body without a closed-filehandle error.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
PerlOnJava's Java-backed IO::Socket::SSL path can mark an HTTPS socket closed while Net::HTTP::NB is reading a chunked response body. The same request completes under system Perl with native IO::Socket::SSL/Net::SSLeay.
Reproduction and evidence
On PerlOnJava source/JAR commit 4b3ef9770 (Perl 5.44.1, Java 24.0.2, macOS arm64), a WWW::Mechanize GET to http://www.pearsoned.co.uk/Bookshop/ followed redirects to https://www.pearson.com/en-gb/higher-education/educators.html. Both runtimes sent the same User-Agent and Accept-Encoding: gzip request headers. The final response was 200 OK, Transfer-Encoding: chunked, and Content-Encoding: gzip.
With system Perl 5.42.2, LWP read the response to completion (about 379 KB). With PerlOnJava, the response body read consumed 13–15 bytes already buffered with the response headers, then the next sysread failed with sysread() on closed filehandle; the returned body was empty. PerlOnJava loads the bundled Java-backed IO::Socket::SSL shim and wraps the socket with Java SSLSocket; system Perl loaded its native SSL modules.
The CPAN run 20261103-123832-91742 showed a related visible failure in WWW-Scraper-ISBN-Pearson_Driver 0.24, t/10object.t: the expected Pearson search form was unavailable. The endpoint currently redirects to a modern Pearson page with no forms, so that live-site test is not a stable regression test. A deterministic local TLS/chunked-body regression should cover the socket read failure.
Expected and actual
Expected: PerlOnJava reads the full chunked TLS response body, matching system Perl.
Actual: a later sysread sees a closed filehandle after a small buffered prefix, and LWP returns an empty/partial body.
Related work
Issue #1435 / PR #1805 covered HTTPS response metadata and local TLS bridge coverage, not body reads. PR #1856 covered Unix datagram socket owner retention; no duplicate for this TLS/chunked read failure was found.
- Linguagem predominante
- Perl
- Estrelas
- 65
- Forks
- 8
- Merge médio
- 5h 54min
- PRs com merge (30d)
- 184
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de fglock/PerlOnJava
-
area:runtime documentation enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
fglock/PerlOnJava#1579 ·
Mantenedores costumam responder em até 1 dia
-
area:backend bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
fglock/PerlOnJava#1981 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
area:runtime bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 57/100
fglock/PerlOnJava#1980 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
area:parser bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
fglock/PerlOnJava#1979 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
fglock/PerlOnJava#1961 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de fglock/PerlOnJava
Issues semelhantes
-
check_keywords.pl dies before reporting an unknown keyword categoryTalvez já em andamento @zhaohai666 assumiu hoje. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 87/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
wave-followup
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100