Minor test and type fixes
This commit is contained in:
parent
e451b7f43e
commit
b46418d774
2 changed files with 6 additions and 2 deletions
|
|
@ -604,6 +604,10 @@ Note that in this case SSL_ERROR_ZERO_RETURN does not necessarily indicate that
|
||||||
}
|
}
|
||||||
SSL_free(rc->rc_ssl);
|
SSL_free(rc->rc_ssl);
|
||||||
rc->rc_ssl = NULL;
|
rc->rc_ssl = NULL;
|
||||||
|
#ifdef HAVE_LIBEVHTP
|
||||||
|
if (rc->rc_evconn)
|
||||||
|
rc->rc_evconn->ssl = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (close(rc->rc_s) < 0){
|
if (close(rc->rc_s) < 0){
|
||||||
clicon_err(OE_UNIX, errno, "close");
|
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");
|
cprintf(cb, "HTTP/1.1 400 Bad Request\r\nConnection: close\r\n");
|
||||||
if (body){
|
if (body){
|
||||||
cprintf(cb, "Content-Type: %s\r\n", media);
|
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
|
else
|
||||||
cprintf(cb, "Content-Length: 0\r\n");
|
cprintf(cb, "Content-Length: 0\r\n");
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ new "restconf DELETE whole datastore"
|
||||||
expectpart "$(curl $CURLOPTS -X DELETE $RCPROTO://localhost/restconf/data)" 0 "HTTP/$HVER 204"
|
expectpart "$(curl $CURLOPTS -X DELETE $RCPROTO://localhost/restconf/data)" 0 "HTTP/$HVER 204"
|
||||||
|
|
||||||
#--------------- Multiple request in single TCP tests
|
#--------------- 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" '<data/>' "HTTP/$HVER 201"
|
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" '<data/>' "HTTP/$HVER 201"
|
||||||
|
|
||||||
#--------------- json type tests
|
#--------------- json type tests
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue