diff options
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rw-r--r-- | indra/llcorehttp/_httpoprequest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 07cc0e4625..f35f9848ff 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -47,6 +47,8 @@ #include "llhttpconstants.h" #include "llproxy.h" +#include "httpstats.h" + // *DEBUG: "[curl:bugs] #1420" problem and testing. // // A pipelining problem, https://sourceforge.net/p/curl/bugs/1420/, @@ -805,6 +807,7 @@ size_t HttpOpRequest::writeCallback(void * data, size_t size, size_t nmemb, void } const size_t req_size(size * nmemb); const size_t write_size(op->mReplyBody->append(static_cast<char *>(data), req_size)); + HTTPStats::instance().recordDataDown(write_size); return write_size; } @@ -833,7 +836,8 @@ size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void const size_t do_size((std::min)(req_size, body_size - op->mCurlBodyPos)); const size_t read_size(op->mReqBody->read(op->mCurlBodyPos, static_cast<char *>(data), do_size)); - op->mCurlBodyPos += read_size; + HTTPStats::instance().recordDataUp(read_size); + op->mCurlBodyPos += read_size; return read_size; } |