From a1a594984ab4702a71c99b7d351fd2c0c0bbdb57 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Fri, 14 Jun 2019 09:23:26 +0900 Subject: [PATCH] HTTP/2: increment write_vio.ndone by consumed size --- proxy/http2/Http2Stream.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index 436f5857a5e..65432c140d1 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -587,8 +587,8 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, // Still parsing the response_header int bytes_used = 0; int state = this->response_header.parse_resp(&http_parser, this->response_reader, &bytes_used, false); - // HTTPHdr::parse_resp() consumed the response_reader in above - write_vio.ndone += this->response_header.length_get(); + // HTTPHdr::parse_resp() consumed the response_reader in above (consumed size is `bytes_used`) + write_vio.ndone += bytes_used; switch (state) { case PARSE_RESULT_DONE: {