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:
Arnout Vandecappelle (Essensium/Mind)
2010-11-02 11:14:43 +01:00
parent de934641be
commit bdb396cc5d
+1 -1
View File
@@ -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);