* JSON errors are now labelled with JSON and not XML

* Fixed: [Performance issue when parsing large JSON param](https://github.com/clicon/clixon/issues/266)
* Moved strlen() from for end condition
* Fixed debugging of xpath parser
This commit is contained in:
Olof hagsand 2021-09-20 20:30:56 +02:00
parent 3cd3f7987d
commit 392e6679c5
17 changed files with 166 additions and 89 deletions

View file

@ -287,6 +287,7 @@ restconf_convert_hdr(clicon_handle h,
cbuf *cb = NULL;
int i;
char c;
size_t len;
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new");
@ -294,7 +295,8 @@ restconf_convert_hdr(clicon_handle h,
}
/* convert key name */
cprintf(cb, "HTTP_");
for (i=0; i<strlen(name); i++){
len = strlen(name);
for (i=0; i<len; i++){
c = name[i] & 0xff;
if (islower(c))
cprintf(cb, "%c", toupper(c));