mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-13 10:15:00 +00:00
Bugfix of Issue #200: Multiple calls to mg_read always return the same data.
The buffer must skip over consumed_content.
This commit is contained in:
parent
de934641be
commit
bdb396cc5d
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user