Skip to content

Test xmlreq:fail_ctype fails with libxml2 2.13.9 #217

@atsampson

Description

@atsampson

Describe the bug
The test_ctype test fails when neon is built against libxml2 2.13.9.

In this test, an invalid charset is given in the Content-Type header, and the test checks that ne_xml_dispatch_request fails. It should fail when ne_xml_set_encoding calls xmlCtxtResetPush with the invalid encoding value - but it doesn't.

It looks like the change around line 1226 of this libxml2 commit, which first appeared in v2.13.4 and was a fix for this bug, now results in libxml2 emitting an optional warning message instead of raising a fatal error in this case.

Environment

  • neon version: 0.36.0 and current HEAD
  • OS: internal Linux build
  • SSL library version: OpenSSL 3.6.0
  • libxml2 version: 2.13.9

To Reproduce
I built with ./configure --prefix=/tmp/neon --enable-shared --with-ssl=openssl --with-libxml2, then did make -j8 check, which eventually gives:

[...]
compress.............. 22/22 passed 
xml...................  5/ 5 passed 
xmlreq................  3/ 4 FAIL - fail_ctype (XML parse did not fail)
xmlreq................  3/ 4 passed, 1 failed 
 -->>> xmlreq failed => 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions