* Fixed: [comma in yang list name will lead to cli setting error #186](https://github.com/clicon/clixon/issues/186)
This commit is contained in:
parent
a8d29b1e7e
commit
608f298ed9
11 changed files with 94 additions and 48 deletions
|
|
@ -214,7 +214,7 @@ get_user_cookie(char *cookiestr,
|
|||
cvec *cvv = NULL;
|
||||
char *c;
|
||||
|
||||
if (str2cvec(cookiestr, ';', '=', &cvv) < 0)
|
||||
if (uri_str2cvec(cookiestr, ';', '=', 1, &cvv) < 0)
|
||||
goto done;
|
||||
if ((c = cvec_find_str(cvv, attribute)) != NULL){
|
||||
if ((*val = strdup(c)) == NULL)
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ evhtp_params_set(clicon_handle h,
|
|||
goto done;
|
||||
/* SSL subject fields, eg CN (Common Name) , can add more here? */
|
||||
if ((subject = (char*)htp_sslutil_subject_tostr(req->conn->ssl)) != NULL){
|
||||
if (str2cvec(subject, '/', '=', &cvv) < 0)
|
||||
if (uri_str2cvec(subject, '/', '=', 1, &cvv) < 0)
|
||||
goto done;
|
||||
if ((cn = cvec_find_str(cvv, "CN")) != NULL){
|
||||
if (restconf_param_set(h, "SSL_CN", cn) < 0)
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ main(int argc,
|
|||
cvec *qvec = NULL;
|
||||
query = restconf_param_get(h, "QUERY_STRING");
|
||||
if (query != NULL && strlen(query))
|
||||
if (str2cvec(query, '&', '=', &qvec) < 0)
|
||||
if (uri_str2cvec(query, '&', '=', 1, &qvec) < 0)
|
||||
goto done;
|
||||
api_root_restconf(h, req, qvec); /* This is the function */
|
||||
if (qvec){
|
||||
|
|
@ -550,7 +550,7 @@ main(int argc,
|
|||
cvec *qvec = NULL;
|
||||
query = restconf_param_get(h, "QUERY_STRING");
|
||||
if (query != NULL && strlen(query))
|
||||
if (str2cvec(query, '&', '=', &qvec) < 0)
|
||||
if (uri_str2cvec(query, '&', '=', 1, &qvec) < 0)
|
||||
goto done;
|
||||
api_stream(h, req, qvec, stream_path, &finish);
|
||||
if (qvec){
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ api_root_restconf(clicon_handle h,
|
|||
goto done;
|
||||
}
|
||||
clicon_debug(1, "%s: api_resource=%s", __FUNCTION__, api_resource);
|
||||
if (str2cvec(path, '/', '=', &pcvec) < 0) /* rest url eg /album=ricky/foo */
|
||||
if (uri_str2cvec(path, '/', '=', 1, &pcvec) < 0) /* rest url eg /album=ricky/foo */
|
||||
goto done;
|
||||
/* data */
|
||||
if ((cb = restconf_get_indata(req)) == NULL) /* XXX NYI ACTUALLY not always needed, do this later? */
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ api_stream(clicon_handle h,
|
|||
}
|
||||
clicon_debug(1, "%s: method=%s", __FUNCTION__, method);
|
||||
|
||||
if (str2cvec(path, '/', '=', &pcvec) < 0) /* rest url eg /album=ricky/foo */
|
||||
if (uri_str2cvec(path, '/', '=', 1, &pcvec) < 0) /* rest url eg /album=ricky/foo */
|
||||
goto done;
|
||||
/* data */
|
||||
if ((cb = restconf_get_indata(req)) == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue