kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit a191445f76991637be3e1a09cfbf266e3ffd52a5
parent 5d16a7a12328527e174d8ad62cb3fa7085e3d6de
Author: Joris Vink <joris@coders.se>
Date:   Tue,  2 Apr 2019 22:26:44 +0200

set body length+offset to 0 when populating data.

otherwise this isn't properly picked up by http_body_read() later
if dealing with in-memory HTTP bodies and you get inconsistent behaviour.

Diffstat:
src/http.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/http.c b/src/http.c @@ -1106,6 +1106,8 @@ http_populate_post(struct http_request *req) body = NULL; req->http_body->offset = req->content_length; string = kore_buf_stringify(req->http_body, NULL); + req->http_body_length = 0; + req->http_body_offset = 0; } else { body = kore_buf_alloc(128); for (;;) {