Welcome! Log In Create A New Profile

Advanced

[njs] XML: fixed tests with libxml2 2.13 and later.

Anonymous User
November 07, 2024 02:06PM
details: https://github.com/nginx/njs/commit/597b1fd1fa34999ec47bbd574da35491f56b8893
branches: master
commit: 597b1fd1fa34999ec47bbd574da35491f56b8893
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed, 6 Nov 2024 22:08:21 -0800
description:
XML: fixed tests with libxml2 2.13 and later.

This fixes #812 issue on Github.

---
external/njs_xml_module.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/external/njs_xml_module.c b/external/njs_xml_module.c
index 86c896c0..d9f3bbb5 100644
--- a/external/njs_xml_module.c
+++ b/external/njs_xml_module.c
@@ -1275,17 +1275,13 @@ njs_xml_node_tags_handler(njs_vm_t *vm, xmlNode *current, njs_str_t *name,

/* set or delete. */

- copy = xmlDocCopyNode(current, current->doc, 1);
+ copy = xmlDocCopyNode(current, current->doc,
+ 2 /* copy properties and namespaces */);
if (njs_slow_path(copy == NULL)) {
njs_vm_internal_error(vm, "xmlDocCopyNode() failed");
return NJS_ERROR;
}

- if (copy->children != NULL) {
- xmlFreeNodeList(copy->children);
- copy->children = NULL;
- }
-
if (retval == NULL) {
/* delete. */
return njs_xml_replace_node(vm, current, copy);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] XML: fixed tests with libxml2 2.13 and later.

Anonymous User 187 November 07, 2024 02:06PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 207
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready