Summary
Restore complete HTTP::Message/HTTP::Request compatibility. HTTP::Request is provided by the pure-Perl HTTP-Message distribution; version 7.04 currently fails under PerlOnJava even though the same upstream suite passes under system Perl.
The archived CPAN random-tester run is 20260825-135237-11904, target HTTP::Request.
Results
System Perl, using the exact HTTP-Message 7.04 source:
All tests successful.
Files=23, Tests=871
Result: PASS
PerlOnJava 5.44.1:
Files=23, Tests=745
Result: FAIL
Failed 5/23 test programs. 9/745 executed subtests failed.
Two test programs abort early, so the executed-subtest count understates the impact. The failing files are:
t/common-req.tt/message-charset.tt/message-decode-bzipbomb.tt/message-decode-zipbomb.tt/message.t
The report previously recorded 502/678 passing assertions in May; the current 736/745 executed assertions are substantial progress, but the distribution has not regained the complete PASS recorded by the March smoke-test investigation for HTTP-Message 7.01.
Confirmed root defect: utf8::downgrade destroys references
HTTP::Message deliberately calls utf8::downgrade on content values, including references. Standard Perl preserves the value and reference type:
my$value = sub { 42 };
printref($value), '|', utf8::downgrade($value, 1), '|', ref($value), '|', $value->(), "\n";Expected/system Perl:
Both PerlOnJava backends currently produce:
The implementation converts the scalar to a string and writes that string back with byte-string type, losing the reference. This directly explains:
t/common-req.t: dynamic upload content is expected to remain a CODE reference, then aborts while invoking the corrupted value.t/message.t: reference content/content_ref behavior aborts with Setting content_ref to a non-ref.
Additional failure clusters
Charset and tied-variable semantics
content_charset leaves $_ alone reports two unexpected stores.- UTF-8 fallback decoding returns
undef where system Perl returns the expected byte/character values.
Compressed-body size limits and multilayer decoding
- bzip2 decoding does not raise the expected size-limit error.
- triple-gzip decoding returns
undef instead of the 16 MiB decoded body. - likely areas include the Java
Compress::Raw::Zlib and Compress::Raw::Bzip2 implementations, especially LimitOutput, buffer sizing, and status values such as Z_BUF_ERROR/BZ_OUTBUFF_FULL.
These should be reduced independently after the reference-preservation defect is fixed, since the early aborts currently hide later assertions.
Impact
HTTP::Message is foundational for LWP and the HTTP stacks used by Catalyst, Dancer2, Plack-related tooling, CPAN clients, and many other distributions. The cached bulk dependency data contains at least 86 unique direct runtime dependants of HTTP::Request, including 23 recent dependants; this is a lower bound rather than an exhaustive targeted result.
The distribution is pure Perl. The work should consist of reusable runtime/backend fixes, not a CPAN source patch.
Acceptance criteria
Summary
Restore complete HTTP::Message/HTTP::Request compatibility.
HTTP::Requestis provided by the pure-PerlHTTP-Messagedistribution; version 7.04 currently fails under PerlOnJava even though the same upstream suite passes under system Perl.The archived CPAN random-tester run is
20260825-135237-11904, targetHTTP::Request.Results
System Perl, using the exact HTTP-Message 7.04 source:
PerlOnJava 5.44.1:
Two test programs abort early, so the executed-subtest count understates the impact. The failing files are:
t/common-req.tt/message-charset.tt/message-decode-bzipbomb.tt/message-decode-zipbomb.tt/message.tThe report previously recorded 502/678 passing assertions in May; the current 736/745 executed assertions are substantial progress, but the distribution has not regained the complete PASS recorded by the March smoke-test investigation for HTTP-Message 7.01.
Confirmed root defect:
utf8::downgradedestroys referencesHTTP::Message deliberately calls
utf8::downgradeon content values, including references. Standard Perl preserves the value and reference type:Expected/system Perl:
Both PerlOnJava backends currently produce:
The implementation converts the scalar to a string and writes that string back with byte-string type, losing the reference. This directly explains:
t/common-req.t: dynamic upload content is expected to remain aCODEreference, then aborts while invoking the corrupted value.t/message.t: reference content/content_ref behavior aborts withSetting content_ref to a non-ref.Additional failure clusters
Charset and tied-variable semantics
content_charset leaves $_ alonereports two unexpected stores.undefwhere system Perl returns the expected byte/character values.Compressed-body size limits and multilayer decoding
undefinstead of the 16 MiB decoded body.Compress::Raw::ZlibandCompress::Raw::Bzip2implementations, especiallyLimitOutput, buffer sizing, and status values such asZ_BUF_ERROR/BZ_OUTBUFF_FULL.These should be reduced independently after the reference-preservation defect is fixed, since the early aborts currently hide later assertions.
Impact
HTTP::Message is foundational for LWP and the HTTP stacks used by Catalyst, Dancer2, Plack-related tooling, CPAN clients, and many other distributions. The cached bulk dependency data contains at least 86 unique direct runtime dependants of
HTTP::Request, including 23 recent dependants; this is a lower bound rather than an exhaustive targeted result.The distribution is pure Perl. The work should consist of reusable runtime/backend fixes, not a CPAN source patch.
Acceptance criteria
utf8::downgrade($reference, 1)preserves CODE, ARRAY, HASH, SCALAR, and object references.$_, Encode, zlib, and bzip2 runtime defects.