diff --git a/src/http.c b/src/http.c index a7fe28b..ad19daa 100644 --- a/src/http.c +++ b/src/http.c @@ -648,7 +648,8 @@ http_header_recv(struct netbuf *nb) if (bytes_left > 0) { kore_debug("%ld/%ld (%ld - %ld) more bytes for body", bytes_left, clen, nb->s_off, len); - net_recv_expand(c, bytes_left, req, http_body_recv); + c->rnb->extra = req; + net_recv_reset(c, bytes_left, http_body_recv); } else if (bytes_left == 0) { req->flags |= HTTP_REQUEST_COMPLETE; req->flags &= ~HTTP_REQUEST_EXPECT_BODY; @@ -1121,6 +1122,7 @@ http_body_recv(struct netbuf *nb) req->flags |= HTTP_REQUEST_COMPLETE; req->flags &= ~HTTP_REQUEST_EXPECT_BODY; + nb->extra = NULL; kore_debug("received all body data for request %p", req); return (KORE_RESULT_OK);