Skip to content
Permalink
Browse files

Fixing wrong parsing of AcceptLanguages/Language nodes.

  • Loading branch information...
constantinius committed Mar 16, 2018
1 parent 58a26d8 commit 83d1716940657dfb93a82c0047e757fa4370a31b
Showing with 9 additions and 1 deletion.
  1. +9 −1 mapwcs20.c
@@ -818,7 +818,15 @@ static int msWCSParseRequest20_XMLGetCapabilities(
/* Maybe not necessary, since only format is xml. */
/* At least ignore it, to not generate an error. */
} else if(EQUAL((char *)child->name, "AcceptLanguages")) {
params->accept_languages = CSLAddString(params->accept_languages, content);
xmlNodePtr languageNode;
XML_FOREACH_CHILD(child, languageNode) {
XML_LOOP_IGNORE_COMMENT_OR_TEXT(languageNode)
XML_ASSERT_NODE_NAME(languageNode, "Language");

content = (char *)xmlNodeGetContent(languageNode);
params->accept_languages = CSLAddString(params->accept_languages, content);
xmlFree(content);
}
} else {
XML_UNKNOWN_NODE_ERROR(child);
}

0 comments on commit 83d1716

Please sign in to comment.
You can’t perform that action at this time.