More restconf error tests for coverage

This commit is contained in:
Olof hagsand 2021-04-25 16:07:00 +02:00
parent 448b56ca0c
commit 4c1249fd9b
5 changed files with 153 additions and 91 deletions

View file

@ -504,6 +504,7 @@ evhtp_params_set(clicon_handle h,
if (restconf_param_set(h, "REQUEST_URI", path->full) < 0)
goto done;
clicon_debug(1, "%s proto:%d", __FUNCTION__, req->proto);
/* XXX: Any two http numbers seem accepted by evhtp, like 1.99, 99.3 as http/1.1*/
if (req->proto != EVHTP_PROTO_10 &&
req->proto != EVHTP_PROTO_11){
if (restconf_badrequest(h, req) < 0)