Http data server Fixed binary data retrieval

This commit is contained in:
Olof hagsand 2022-05-05 18:06:42 +02:00
parent 90474d1523
commit 7452813da7
7 changed files with 28 additions and 13 deletions

View file

@ -329,7 +329,10 @@ restconf_http1_reply(restconf_conn *rc,
cprintf(sd->sd_outp_buf, "\r\n");
/* Write a body */
if (sd->sd_body){
cbuf_append_str(sd->sd_outp_buf, cbuf_get(sd->sd_body));
if (cbuf_append_buf(sd->sd_outp_buf, cbuf_get(sd->sd_body), cbuf_len(sd->sd_body)) < 0){
clicon_err(OE_RESTCONF, errno, "cbuf_append_buf");
goto done;
}
}
retval = 0;
done: