http resume后应给tcp层返回当前数据的处理结果。

This commit is contained in:
zhengchao
2018-10-19 18:01:53 +08:00
parent 26be2a60cc
commit 8a0f3c8c3c
2 changed files with 17 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -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));