* Fixed: [clixon_netconf errors on client XML Declaration with valid encoding spec](https://github.com/clicon/clixon/issues/250)
This commit is contained in:
parent
9aad253f1e
commit
355ed7d96a
3 changed files with 6 additions and 1 deletions
|
|
@ -56,6 +56,7 @@ Users may have to change how they access the system
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
|
* Fixed: [clixon_netconf errors on client XML Declaration with valid encoding spec](https://github.com/clicon/clixon/issues/250)
|
||||||
* Fixed: Yang patterns: \n and other non-printable characters were broken
|
* Fixed: Yang patterns: \n and other non-printable characters were broken
|
||||||
* Example: Clixon interpereted them two characters: `\\ n` instead of ascii 10
|
* Example: Clixon interpereted them two characters: `\\ n` instead of ascii 10
|
||||||
* Fixed: The auto-cli identityref did not expand identities in grouping/usecases properly.
|
* Fixed: The auto-cli identityref did not expand identities in grouping/usecases properly.
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ static int
|
||||||
xml_parse_encoding(clixon_xml_yacc *xy,
|
xml_parse_encoding(clixon_xml_yacc *xy,
|
||||||
char *enc)
|
char *enc)
|
||||||
{
|
{
|
||||||
if(strcmp(enc, "UTF-8")){
|
if(strcasecmp(enc, "UTF-8")){
|
||||||
clicon_err(OE_XML, XMLPARSE_ERRNO, "Unsupported XML encoding: %s expected UTF-8", enc);
|
clicon_err(OE_XML, XMLPARSE_ERRNO, "Unsupported XML encoding: %s expected UTF-8", enc);
|
||||||
free(enc);
|
free(enc);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,10 @@ expecteof "$clixon_util_xml -ol o" 255 '<?xml verion="1.0"?><a/>' '' 2> /dev/nul
|
||||||
new "XMLdecl version + encoding"
|
new "XMLdecl version + encoding"
|
||||||
expecteof "$clixon_util_xml -o" 0 '<?xml version="1.0" encoding="UTF-8"?><a/>' '<a/>'
|
expecteof "$clixon_util_xml -o" 0 '<?xml version="1.0" encoding="UTF-8"?><a/>' '<a/>'
|
||||||
|
|
||||||
|
# XML processors SHOULD match character encoding names in a case-insensitive way
|
||||||
|
new "XMLdecl encoding case-insensitive"
|
||||||
|
expecteof "$clixon_util_xml -o" 0 '<?xml version="1.0" encoding="utf-8"?><a/>' '<a/>'
|
||||||
|
|
||||||
new "XMLdecl version + wrong encoding"
|
new "XMLdecl version + wrong encoding"
|
||||||
expecteof "$clixon_util_xml -o" 255 '<?xml version="1.0" encoding="UTF-16"?><a/>' '' 2> /dev/null
|
expecteof "$clixon_util_xml -o" 255 '<?xml version="1.0" encoding="UTF-16"?><a/>' '' 2> /dev/null
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue