From 3776c69ab82e2540ad78c3a81ee2335cb2b66cb0 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Tue, 30 Mar 2021 07:28:57 +0900 Subject: [PATCH] Update server_response_body_bytes when background fill worked (#7621) (cherry picked from commit ba977148eb4bf7b4c4da818f2e4f797f576280ce) --- proxy/http/HttpSM.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index eb1dc93acbd..e43fd32aac3 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3403,6 +3403,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; }