You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2020/02/26 21:39:19 UTC

[trafficserver] branch 7.1.x updated: Fix to handle 304 response without timeout

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new 4c1006a  Fix to handle 304 response without timeout
4c1006a is described below

commit 4c1006a59c14501d25777b69a72d015b44e3ce1a
Author: Susan Hinrichs <sh...@verizonmedia.com>
AuthorDate: Wed Feb 26 16:05:20 2020 +0000

    Fix to handle 304 response without timeout
---
 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 aa86876..5bf21b1 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -578,6 +578,7 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len,
     return;
   }
 
+  int send_event = (write_vio.ntodo() == bytes_avail || is_done) ? VC_EVENT_WRITE_COMPLETE : VC_EVENT_WRITE_READY;
   // Process the new data
   if (!this->response_header_done) {
     // Still parsing the response_header
@@ -602,7 +603,7 @@ 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
-      if (this->response_is_data_available()) {
+      if (this->response_is_data_available() || send_event == VC_EVENT_WRITE_COMPLETE) {
         this->send_response_body(call_update);
       }
       break;