Skip to content

Commit

Permalink
Merge r1914013 from trunk:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
notroj committed Jan 3, 2024
1 parent 6435f22 commit a10ceb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changes-entries/xmlchar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*) mod_xml2enc: Tolerate libxml2 2.12.0 and later.
[ttachi <tachihara AT hotmail.com>]
6 changes: 3 additions & 3 deletions modules/filters/mod_xml2enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.") ;
Expand Down

0 comments on commit a10ceb1

Please sign in to comment.