diff --git a/plugin/protocol/http2/src/http2_stream.cpp b/plugin/protocol/http2/src/http2_stream.cpp index 96a97b3..c63c5ff 100644 --- a/plugin/protocol/http2/src/http2_stream.cpp +++ b/plugin/protocol/http2/src/http2_stream.cpp @@ -1042,6 +1042,10 @@ void delete_http2_stream_data(struct tfe_h2_session *h2_session, delete_stream_half_data(&h2_session->req, body_flag, CONN_DIR_DOWNSTREAM); delete_stream_half_data(&h2_session->resp, body_flag, CONN_DIR_UPSTREAM); + + delete_stream_half_data(&h2_session->plugin_built_req, body_flag, CONN_DIR_DOWNSTREAM); + + delete_stream_half_data(&h2_session->plugin_built_resp, body_flag, CONN_DIR_UPSTREAM); } void nghttp2_disect_goaway(struct tfe_h2_stream *h2_stream_info) @@ -2040,7 +2044,7 @@ 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 || input_len == 1) + if (h2_session == NULL ) { return 0; } @@ -2075,7 +2079,11 @@ nghttp2_client_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, stream_action = ACTION_FORWARD_DATA; TFE_LOG_ERROR(logger()->handle, "Fatal upstream(%d) send error: %s\n",stream_id, nghttp2_strerror(xret)); } - } + } + if(uncompr) + { + FREE(&uncompr); + } h2_stream_info->stream_action = stream_action; return 0; } @@ -2115,7 +2123,10 @@ nghttp2_client_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, resp->h2_payload.flags = flags; } } - if (uncompr_len) FREE(&uncompr); + if (uncompr_len) + { + FREE(&uncompr); + } stream_action = nghttp2_submit_data_by_h2_half(h2_stream_info, h2_session, CONN_DIR_UPSTREAM); if (stream_action == ACTION_DROP_DATA) {