From 64d1024a9df166e34251e47efe73b530dea625c6 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Wed, 21 Feb 2018 11:30:08 +0900 Subject: [PATCH] Call mark_body_done() when response body is empty a98021cb21ea2e180ba2664a80d9c154893b97af broke logic of calling mark_body_done() when response body is empty like 304 Not Modified. --- proxy/http2/Http2Stream.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index c8473223249..120b2b17b55 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -608,8 +608,9 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, // If there is additional data, send it along in a data frame. Or if this was header only // make sure to send the end of stream + is_done |= (write_vio.ntodo() + this->response_header.length_get()) == bytes_avail; if (this->response_is_data_available() || is_done) { - if ((write_vio.ntodo() + this->response_header.length_get()) == bytes_avail || is_done) { + if (is_done) { this->mark_body_done(); }