Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions proxy/http2/Http2ConnectionState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 8 additions & 0 deletions proxy/http2/Http2Stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 2 additions & 0 deletions proxy/http2/Http2Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down