From ef090d425e0252ee9968422a4168962356ca6c4a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 26 Feb 2015 23:48:16 +0900 Subject: [PATCH] nghttpx: Add missing Downstream::end_upload_data() call in HTTP/2 and SPDY This ensures that all frontend code calls Downstream::end_upload_data() when request was all received. --- src/shrpx_http2_upstream.cc | 1 + src/shrpx_spdy_upstream.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc index f5cb3d85..b2477db2 100644 --- a/src/shrpx_http2_upstream.cc +++ b/src/shrpx_http2_upstream.cc @@ -273,6 +273,7 @@ int on_request_headers(Http2Upstream *upstream, Downstream *downstream, if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { downstream->disable_upstream_rtimer(); + downstream->end_upload_data(); downstream->set_request_state(Downstream::MSG_COMPLETE); } diff --git a/src/shrpx_spdy_upstream.cc b/src/shrpx_spdy_upstream.cc index 095e3b24..7af2ce18 100644 --- a/src/shrpx_spdy_upstream.cc +++ b/src/shrpx_spdy_upstream.cc @@ -209,6 +209,7 @@ void on_ctrl_recv_callback(spdylay_session *session, spdylay_frame_type type, } downstream->disable_upstream_rtimer(); + downstream->end_upload_data(); downstream->set_request_state(Downstream::MSG_COMPLETE); }