mirror of https://git.kore.io/kore.git
Use net_recv_reset() if more body bytes are coming.
Unbreaks clients that send the headers first and the actual HTTP body after X amount of time.
This commit is contained in:
parent
f8a9ece9a6
commit
ad5d662556
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue