Added error handling in yang_path_arg triggered by no filter in get paginated

Fixed cornercase of restconf error return when no body
Fixed cornercase when exactly / given as xpath
Better error message when YANG not found: added which YANG file imports it
This commit is contained in:
Olof hagsand 2021-11-09 20:02:40 +01:00
parent a4b4dc97ce
commit 2dcc14a0db
9 changed files with 39 additions and 14 deletions

View file

@ -487,7 +487,7 @@ http2_exec(restconf_conn *rc,
* (Successful) response to a CONNECT request (Section 4.3.6 of
* [RFC7231]).
*/
if (sd->sd_code != 204 && sd->sd_code > 199)
if (sd->sd_code != 204 && sd->sd_code > 199 && sd->sd_body_len)
if (restconf_reply_header(sd, "Content-Length", "%zu", sd->sd_body_len) < 0)
goto done;
if (sd->sd_code){