diff --git a/platform/src/tcp_stream.cpp b/platform/src/tcp_stream.cpp index bc7e762..24d17a6 100644 --- a/platform/src/tcp_stream.cpp +++ b/platform/src/tcp_stream.cpp @@ -624,7 +624,6 @@ __close_connection: //fprintf(stderr, "---- eventcb ----, close this connection, " // "stream = %p, event = %x, dir = %s\n", _stream, events, __str_dir); - assert((*ref_this_conn)->on_writing == 0); __conn_private_destory_with_ssl(ev_base, *ref_this_conn, *ref_this_ssl_stream); *ref_this_conn = NULL; *ref_this_ssl_stream = NULL; @@ -720,6 +719,7 @@ void ssl_downstream_create_on_success(future_result_t * result, void * user) void ssl_downstream_create_on_fail(enum e_future_error err, const char * what, void * user) { + fprintf(stderr, "---- downstream create fail !!!\n"); return; } @@ -750,6 +750,7 @@ void ssl_upstream_create_on_success(future_result_t * result, void * user) void ssl_upstream_create_on_fail(enum e_future_error err, const char * what, void * user) { + fprintf(stderr, "---- upstream create fail !!!\n"); return; } diff --git a/plugin/protocol/http/src/http_entry.cpp b/plugin/protocol/http/src/http_entry.cpp index 8d1e315..fa84675 100644 --- a/plugin/protocol/http/src/http_entry.cpp +++ b/plugin/protocol/http/src/http_entry.cpp @@ -241,8 +241,17 @@ enum tfe_stream_action __http_connection_entry_on_request(const struct tfe_strea goto __errout; } + if(hf_private_req_in->is_user_stream_action_set) + { + hf_private_req_in->stream_action = hf_private_req_in->user_stream_action; + } + else + { + hf_private_req_in->stream_action = ACTION_FORWARD_DATA; + } + /* Ignore parse the content which is nullptr. */ - goto __out; + goto __boundary; } /* Parse the content, the data which in defered state has been ignored. */ @@ -281,16 +290,17 @@ enum tfe_stream_action __http_connection_entry_on_request(const struct tfe_strea goto __errout; } - /* Touch a boundary, such as the end of HTTP headers, bodys, et al. */ - __action_args = hf_private_req_in->parse_cursor; - hf_private_req_in->parse_cursor = 0; - if (__on_request_handle_user_req_or_resp(stream, hs_private, hf_private_req_in, __need_to_close_the_session) < 0) { goto __errout; } +__boundary: + /* Touch a boundary, such as the end of HTTP headers, bodys, et al. */ + __action_args = hf_private_req_in->parse_cursor; + hf_private_req_in->parse_cursor = 0; + if (hf_private_req_in->stream_action == ACTION_FORWARD_DATA) { tfe_stream_action_set_opt(stream, ACTION_OPT_FOWARD_BYTES, &__action_args, sizeof(__action_args));