From 29f80334a7c8436d800d9dd4456c6f66c5d744c9 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Thu, 25 Mar 2021 15:23:10 +0900 Subject: [PATCH] Update server_response_body_bytes when background fill worked --- proxy/http/HttpSM.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index f3d65140467..633113f9ab2 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3544,6 +3544,10 @@ HttpSM::tunnel_handler_cache_write(int event, HttpTunnelConsumer *c) break; } + if (background_fill != BACKGROUND_FILL_NONE) { + server_response_body_bytes = c->bytes_written; + } + HTTP_DECREMENT_DYN_STAT(http_current_cache_connections_stat); return 0; }