diff --git a/apps/restconf/restconf_main_native.c b/apps/restconf/restconf_main_native.c index 4bbe7b47..0a4532cb 100644 --- a/apps/restconf/restconf_main_native.c +++ b/apps/restconf/restconf_main_native.c @@ -604,6 +604,10 @@ Note that in this case SSL_ERROR_ZERO_RETURN does not necessarily indicate that } SSL_free(rc->rc_ssl); rc->rc_ssl = NULL; +#ifdef HAVE_LIBEVHTP + if (rc->rc_evconn) + rc->rc_evconn->ssl = NULL; +#endif } if (close(rc->rc_s) < 0){ clicon_err(OE_UNIX, errno, "close"); @@ -641,7 +645,7 @@ send_badrequest(clicon_handle h, cprintf(cb, "HTTP/1.1 400 Bad Request\r\nConnection: close\r\n"); if (body){ cprintf(cb, "Content-Type: %s\r\n", media); - cprintf(cb, "Content-Length: %u\r\n", strlen(body)); + cprintf(cb, "Content-Length: %zu\r\n", strlen(body)); } else cprintf(cb, "Content-Length: 0\r\n"); diff --git a/test/test_restconf_op.sh b/test/test_restconf_op.sh index 23b82abc..4ff5228d 100755 --- a/test/test_restconf_op.sh +++ b/test/test_restconf_op.sh @@ -204,7 +204,7 @@ new "restconf DELETE whole datastore" expectpart "$(curl $CURLOPTS -X DELETE $RCPROTO://localhost/restconf/data)" 0 "HTTP/$HVER 204" #--------------- Multiple request in single TCP tests - +# XXX THIS HAS LEAKS IN HTTP/1 ONLY! expectpart "$(curl $CURLOPTS -H "Accept: application/yang-data+xml" -X GET $RCPROTO://localhost/restconf/data?content=config --next $CURLOPTS -H "Content-Type: application/yang-data+json" -X POST $RCPROTO://localhost/restconf/data -d '{"example:cont1":{"interface":{"name":"local0","type":"regular"}}}')" 0 "HTTP/$HVER 200" '' "HTTP/$HVER 201" #--------------- json type tests