Fix Java TLS socket reads for chunked HTTPS response bodies
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 56/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- networking
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Perl
- Sterne
- 65
- Forks
- 8
- Ø Merge
- 5 Std. 54 Min.
- Gemergte PRs (30 T.)
- 184
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus fglock/PerlOnJava
-
area:runtime documentation enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
fglock/PerlOnJava#1579 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:backend bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
fglock/PerlOnJava#1981 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:runtime bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 57/100
fglock/PerlOnJava#1980 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:parser bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
fglock/PerlOnJava#1979 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
fglock/PerlOnJava#1961 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in fglock/PerlOnJava
Ähnliche Issues
-
check_keywords.pl dies before reporting an unknown keyword categoryEvtl. vergeben @zhaohai666 hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
wave-followup
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100