]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1914013 from trunk:
authorJoe Orton <jorton@apache.org>
Wed, 3 Jan 2024 15:02:30 +0000 (15:02 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 3 Jan 2024 15:02:30 +0000 (15:02 +0000)
mod_xml2enc: remove dependency on xmlstring header

Submitted by: ttachi <tachihara hotmail.com>
Github: closes #393
Reviewed by: covener, minfrin, jorton

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1915066 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/xmlchar.txt [new file with mode: 0644]
modules/filters/mod_xml2enc.c

diff --git a/changes-entries/xmlchar.txt b/changes-entries/xmlchar.txt
new file mode 100644 (file)
index 0000000..d0e0630
--- /dev/null
@@ -0,0 +1,2 @@
+ *) mod_xml2enc: Tolerate libxml2 2.12.0 and later.
+    [ttachi <tachihara AT hotmail.com>]
index 76046b48ed2ce8d4f8ec770503ed73b0b2cf2486..9e3bc314f4edc61657e23fad9de54aa9c8bb541b 100644 (file)
@@ -206,11 +206,11 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
             }
         }
     }
-  
+
     /* to sniff, first we look for BOM */
     if (ctx->xml2enc == XML_CHAR_ENCODING_NONE) {
-        ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf,
-                                             ctx->bytes); 
+        ctx->xml2enc = xmlDetectCharEncoding((const unsigned char*)ctx->buf,
+                                             ctx->bytes);
         if (HAVE_ENCODING(ctx->xml2enc)) {
             ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01432)
                           "Got charset from XML rules.") ;