Bugfix of Issue #200: Multiple calls to mg_read always return the same data.

The buffer must skip over consumed_content.
parent de934641
......@@ -1332,7 +1332,7 @@ int mg_read(struct mg_connection *conn, void *buf, size_t len) {
}
// How many bytes of data we have buffered in the request buffer?
buffered = conn->buf + conn->request_len;
buffered = conn->buf + conn->request_len + conn->consumed_content;
buffered_len = conn->data_len - conn->request_len;
assert(buffered_len >= 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment