From 5ce3dcfffd16c900b09e1d728efdcb6f9bba8001 Mon Sep 17 00:00:00 2001 From: fengweihao Date: Fri, 5 Feb 2021 18:11:05 +0800 Subject: [PATCH] =?UTF-8?q?TSG-5533=20=E4=BF=AE=E5=A4=8Dios14.0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E6=89=8B=E6=9C=BA=E8=AE=BF=E9=97=AEmail.goog?= =?UTF-8?q?le.com=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/protocol/http2/src/http2_stream.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/protocol/http2/src/http2_stream.cpp b/plugin/protocol/http2/src/http2_stream.cpp index 3d4df91..e36bd38 100644 --- a/plugin/protocol/http2/src/http2_stream.cpp +++ b/plugin/protocol/http2/src/http2_stream.cpp @@ -2052,10 +2052,11 @@ nghttp2_client_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, /*proc build resp*/ /*when input_len == 1 is end_stream, Nghttp2 sends this frame, drop it*/ struct tfe_h2_session *h2_session = (struct tfe_h2_session *)nghttp2_session_get_stream_user_data(session, stream_id); - if (h2_session == NULL || (flags !=0 && input_len == 1)) + if (h2_session == NULL || ((flags & NGHTTP2_FLAG_END_STREAM) && input_len == 1)) { return 0; } + resp = h2_session->resp; if (resp == NULL) { @@ -2074,8 +2075,8 @@ nghttp2_client_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, } else { - /*if input is end_stream, send by nghttp2_submit_frame_data **/ - if (flags != NGHTTP2_FLAG_END_STREAM) + /*if input is end_stream, send by nghttp2_submit_frame_data **/ + if (flags != NGHTTP2_FLAG_END_STREAM && h2_session->plugin_built_resp == NULL) { /**Decompression failed, send this data**/ stream_action = nghttp2_submit_data_by_user(h2_stream_info, h2_session, CONN_DIR_UPSTREAM);