summaryrefslogtreecommitdiffstats
path: root/dnsdist-nghttp2-in.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dnsdist-nghttp2-in.cc')
-rw-r--r--dnsdist-nghttp2-in.cc6
1 files changed, 5 insertions, 1 deletions
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;
}