diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index fecb360efc4..fa8992ba3c0 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1471,6 +1471,7 @@ Http2ConnectionState::send_a_data_frame(Http2Stream *stream, size_t &payload_len // OK if there is no body yet. Otherwise continue on to send a DATA frame and delete the stream if (!stream->is_body_done() && payload_length == 0) { Http2StreamDebug(this->ua_session, stream->get_id(), "No payload"); + stream->signal_more_data_needed(); // Tell cacheVC to send more data return Http2SendDataFrameResult::NO_PAYLOAD; } diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index da681d3d3ae..88e9c09a4d8 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -832,6 +832,14 @@ Http2Stream::response_process_data(bool &done) } } +void +Http2Stream::signal_more_data_needed() +{ + if (this->write_vio.ntodo() > 0 && this->write_vio.get_writer()->write_avail() > 0) { + write_vio.cont->handleEvent(VC_EVENT_WRITE_READY, &write_vio); + } +} + bool Http2Stream::response_is_data_available() const { diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h index a005a624658..ec7b0e2cc21 100644 --- a/proxy/http2/Http2Stream.h +++ b/proxy/http2/Http2Stream.h @@ -243,6 +243,8 @@ class Http2Stream : public ProxyTransaction void mark_milestone(Http2StreamMilestone type); + void signal_more_data_needed(); + private: void response_initialize_data_handling(bool &is_done); void response_process_data(bool &is_done);