Sometimes content_length wasn't properly updated.

This commit is contained in:
Joris Vink 2016-02-22 14:08:21 +01:00
parent 0294212a3c
commit f7b0b7c7ac
1 changed files with 1 additions and 0 deletions

View File

@ -716,6 +716,7 @@ http_header_recv(struct netbuf *nb)
http_body_recv);
c->rnb->extra = req;
http_request_sleep(req);
req->content_length = bytes_left;
} else if (bytes_left == 0) {
req->flags |= HTTP_REQUEST_COMPLETE;
req->flags &= ~HTTP_REQUEST_EXPECT_BODY;