commit f2d8834e8e4aeaca3dd98372a05622ed3ee27011
parent e9b56c81a533deeda3a86b72f5415dfd64ba81b6
Author: Joris Vink <joris@coders.se>
Date: Thu, 7 Jan 2016 10:40:33 +0100
After receiving a body, prime the netbuf again.
Not doing this results in nothing being read anymore
from the connection after a POST with a content-length of > 0.
Found by Xuning Niu.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/http.c b/src/http.c
@@ -1092,6 +1092,8 @@ http_body_recv(struct netbuf *nb)
req->flags &= ~HTTP_REQUEST_EXPECT_BODY;
nb->extra = NULL;
+ nb->flags |= NETBUF_CALL_CB_ALWAYS;
+
kore_debug("received all body data for request %p", req);
return (KORE_RESULT_OK);