]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
pytest_suite: port Perl todo/xfail gaps found when testing against 2.4.x
authorJim Jagielski <jim@apache.org>
Wed, 3 Jun 2026 23:23:47 +0000 (23:23 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 3 Jun 2026 23:23:47 +0000 (23:23 +0000)
commit7fdf4db6d8af1dd2426855399f47bc63a3dac86a
treee03ddce4ceced016628c722d8a138f0ef324977c
parent0d13d7a7d26bffab93ab0ec02167dd91b2a57f44
pytest_suite: port Perl todo/xfail gaps found when testing against 2.4.x

Three test files had behaviour differences between the Python port and
the original Perl framework tests when run against a 2.4.x build
(tested with Apache/2.4.68-dev at /opt/local2/apache2).

test_pr64339.py -- LWP vs httpx default charset for raw bodies
  For /doc.notxml the proxy returns Content-Type: application/notreallyxml
  with no charset and a Latin-1 body.  LWP defaults to ISO-8859-1 for
  charset-less responses; httpx defaults to UTF-8, decoding 0xF3 as a
  replacement character and failing the body match.  Add _lwp_text() to
  mirror LWP: use the Content-Type charset when present, else Latin-1.

test_session.py -- port Perl @todo for PR 58171 and PR 56052
  session.t marks subtests 53/54 (Session writable after decode failure,
  PR 58171) and 88/89 (Session writable after expired, PR 56052) as
  unconditional @todo.  The Python port dropped this bookkeeping.  On
  2.4.x, ap_session_load() sets zz=NULL on a decode failure and allocates
  a fresh session the memoising provider never sees, so nothing is saved;
  trunk uses memset-in-place to preserve the provider pointer.  Add a
  _check(..., todo=True) helper that downgrades failures to warnings,
  matching Perl's todo semantics for both subtests.

test_proxy_html.py -- xfail two metafix cases that fail on 2.4.x
  other header with Content-Type present: mod_proxy_html metafix emits
  no http-equiv headers for meta_contenttype.html because the leading
  charset Content-Type meta is consumed by the xml2enc path on 2.4.x.
  empty content value: metafix locates the content value via a
  case-insensitive search for 'content'; the header name X-Empty-Content
  itself matches first, so no value is extracted.  Gate both via
  pytest.xfail when the server is < 2.5.0, leaving assertions active on
  trunk.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1934952 13f79535-47bb-0310-9956-ffa450edef68
test/pytest_suite/tests/t/apache/test_pr64339.py
test/pytest_suite/tests/t/modules/test_proxy_html.py
test/pytest_suite/tests/t/modules/test_session.py