diff --git a/apps/restconf/restconf_api_native.c b/apps/restconf/restconf_api_native.c index e27cde9f2..76d10c2c4 100644 --- a/apps/restconf/restconf_api_native.c +++ b/apps/restconf/restconf_api_native.c @@ -207,7 +207,13 @@ restconf_reply_send(void *req0, clicon_err(OE_DAEMON, EFAULT, "evhtp_request_get_connection"); goto done; } - /* If body, add a content-length header */ + /* If body, add a content-length header + * A server MUST NOT send a Content-Length header field in any response + * with a status code of 1xx (Informational) or 204 (No Content). A + * server MUST NOT send a Content-Length header field in any 2xx + * (Successful) response to a CONNECT request (Section 4.3.6 of + * [RFC7231]). + */ if (cb != NULL && cbuf_len(cb)){ cprintf(cb, "\r\n"); if (restconf_reply_header(req, "Content-Length", "%d", cbuf_len(cb)) < 0) diff --git a/lib/src/clixon_yang.c b/lib/src/clixon_yang.c index 55a3fd422..38575a897 100644 --- a/lib/src/clixon_yang.c +++ b/lib/src/clixon_yang.c @@ -1627,6 +1627,7 @@ yang_deviation(yang_stmt *ys, if (yang_abs_schema_nodeid(ys, nodeid, &ytarget) < 0) goto done; if (ytarget == NULL){ + clicon_log(LOG_WARNING, "deviation %s: target not found", nodeid); goto ok; /* The RFC does not explicitly say the target node MUST exist clicon_err(OE_YANG, 0, "schemanode sanity check of %s", nodeid); diff --git a/lib/src/clixon_yang_parse_lib.c b/lib/src/clixon_yang_parse_lib.c index 553b3a47a..ad85b9ac2 100644 --- a/lib/src/clixon_yang_parse_lib.c +++ b/lib/src/clixon_yang_parse_lib.c @@ -1323,21 +1323,13 @@ yang_parse_post(clicon_handle h, if (yang_features(h, yang_child_i(yspec, i)) < 0) goto done; - /* 4: Check deviations: not-supported add/delete/replace statements - * done after if-features since they may affect deviations but before populate since target yang statements - * may be removed or changed - */ - for (i=modmin; i