From 037d41a914237592dc3e82751b8be3ff06407af0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 26 Jun 2024 08:28:37 +0200 Subject: Merging upstream version 1.9.5. Signed-off-by: Daniel Baumann --- dnsdist-nghttp2-in.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dnsdist-nghttp2-in.cc') diff --git a/dnsdist-nghttp2-in.cc b/dnsdist-nghttp2-in.cc index e40f5e6..8458bc7 100644 --- a/dnsdist-nghttp2-in.cc +++ b/dnsdist-nghttp2-in.cc @@ -570,8 +570,9 @@ IOState IncomingHTTP2Connection::sendResponse(const struct timeval& now, TCPResp responseBuffer = std::move(response.d_buffer); } + auto sent = responseBuffer.size(); sendResponse(response.d_idstate.d_streamID, context, statusCode, d_ci.cs->dohFrontend->d_customResponseHeaders, contentType, sendContentType); - handleResponseSent(response); + handleResponseSent(response, sent); return hasPendingWrite() ? IOState::NeedWrite : IOState::Done; } @@ -922,6 +923,9 @@ int IncomingHTTP2Connection::on_frame_recv_callback(nghttp2_session* session, co return NGHTTP2_ERR_CALLBACK_FAILURE; } } + else if (frame->hd.type == NGHTTP2_PING) { + conn->d_needFlush = true; + } return 0; } -- cgit v1.2.3