From c036ba7b3b66626869f6698abf4ddbafe110cf97 Mon Sep 17 00:00:00 2001 From: richard1999 Date: Mon, 16 Nov 2015 17:45:18 +0800 Subject: [PATCH] civetweb: the "num_bytes_sent" in struct "mg_connection" is always 0 when download a file When start radosgw with civetweb and then download a file, the "num_bytes_sent" is always 0 in the access log. --- src/civetweb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/civetweb.c b/src/civetweb.c index c9dc3ffd3..2f1d2d3a9 100644 --- a/src/civetweb.c +++ b/src/civetweb.c @@ -2389,6 +2389,7 @@ int mg_write(struct mg_connection *conn, const void *buf, size_t len) total = push(NULL, conn->client.sock, conn->ssl, (const char *) buf, (int64_t) len); } + conn->num_bytes_sent += total; return (int) total; }