Source: apache2
Tags: fixed-upstream patch
Version: 2.4.63-1
Severity: normal
Discovered downstream in Ubuntu during migration tests.
Downstream bug: https://bugs.launchpad.net/bugs/2112429
------
Downstream bug summary:
Discovered through update_excuses and confirmed locally in an LXD
autopkgtest container (from https:/
It fails on debian/
I followed every single step and reproduced in a pure LXD container with the apache2 binaries in proposed.
With this in mind, the following is the specific items in the test at fault:
EXPECTED: response from looking at http://
ACTUAL: response from looking at http://
There is a changelog that introduces this test via a pull
request:
*) mod_xml2enc: Update check to accept any text/ media type
or any XML media type per RFC 7303, avoiding
corruption of Microsoft OOXML formats. PR 64339.
[Joseph Heenan joseph.heenan fintechlabs.io, Joe Orton]
... in 2.4.59 in April 2024. At the time the test was written, Apache was using libxml2 and the 2.12 branch.
After examining the Apache code (modules/
Using HTMLParser from python3-lxml (which is libxml2 wrappings
for Python), I went through the decoding process of
perl-framework/
------
Downstream in Ubuntu, it is simple enough to patch the tests with the attached diff which corresponds to commit 1925450 in upstream test suites.
I looked at the Debian source and the flawed test still exists. This should be patched in Debian.
Thomas
Index: t/apache/pr64339.t =================================================================== --- t/apache/pr64339.t (revision 1925449) +++ t/apache/pr64339.t (revision 1925450) @@ -18,7 +18,7 @@ ['/doc.notxml', "application/notreallyxml", "f\xf3\xf3\n" ], # Sent with charset=ISO-8859-1 - should be transformed to utf-8 - ['/doc.isohtml', "text/html;charset=utf-8", "<html><body><p>fóó\n</p></body></html>" ], + ['/doc.isohtml', "text/html;charset=utf-8", "<html><body>.*fóó\n.*</body></html>" ], ); # mod_xml2enc on trunk behaves quite differently to the 2.4.x version @@ -42,5 +42,5 @@ ok t_cmp($r->code, 200, "fetching ".$t->[0]); ok t_cmp($r->header('Content-Type'), $t->[1], "content-type header test for ".$t->[0]); - ok t_cmp($r->content, $t->[2], "content test for ".$t->[0]); + ok t_cmp($r->content, qr/$t->[2]/, "content test for ".$t->[0]); }