* RESTCONF in Clixon used empty key as "wildchar". But according to RFC 8040 it should mean the "empty string".

* Example: `GET restconf/data/x:a=`
  * Previous meaning (wrong): Return all `a` elements.
  * New meaning (correct): Return the `a` instance with empty key string: "".
* [RESTCONF GET request of single-key list with empty string returns all elements #213](https://github.com/clicon/clixon/issues/213)
* [RESTCONF GETof lists with empty string keys does not work #214](https://github.com/clicon/clixon/issues/214)
This commit is contained in:
Olof hagsand 2021-05-05 15:04:22 +02:00
parent af04ec9e9d
commit 17e7b25537
8 changed files with 77 additions and 22 deletions

View file

@ -713,7 +713,7 @@ api_path2xpath_cvv(cvec *api_path,
goto done;
}
/* Check if has value, means '=' */
if (cv2str(cv, NULL, 0) > 0){
if (cv_type_get(cv) == CGV_STRING){
/* val is uri percent encoded, eg x%2Cy,z */
if ((val = cv2str_dup(cv)) == NULL)
goto done;