Updates for libxml2 >= 2.13.0

libxml2 2.13.0 introduced some relevant changes regarding the treatment
of file paths on Windows[1].  Thus we un-xfail bug69753.phpt and its
companion, and we adjust dom004.phpt.  And we also disable the
workaround for erroneous file:/ URIs on Windows.

[1] <8ab1b122c4>

Closes GH-16536.
This commit is contained in:
Christoph M. Becker 2024-10-21 20:56:16 +02:00
parent 6715860286
commit 30dd291628
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
4 changed files with 8 additions and 9 deletions

View file

@ -423,10 +423,11 @@ static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char
(xmlStrncmp(BAD_CAST uri->scheme, BAD_CAST "file", 4) == 0))) {
resolved_path = xmlURIUnescapeString(filename, 0, NULL);
isescaped = 1;
#if LIBXML_VERSION >= 20902 && defined(PHP_WIN32)
#if LIBXML_VERSION >= 20902 && LIBXML_VERSION < 21300 && defined(PHP_WIN32)
/* Libxml 2.9.2 prefixes local paths with file:/ instead of file://,
thus the php stream wrapper will fail on a valid case. For this
reason the prefix is rather better cut off. */
reason the prefix is rather better cut off.
As of libxml 2.13.0 this issue is resolved. */
{
size_t pre_len = sizeof("file:/") - 1;