todo:http 写文件的bug。
This commit is contained in:
@@ -838,19 +838,30 @@ void hs_ops_response_set(struct tfe_http_session * session, struct tfe_http_half
|
||||
{
|
||||
struct http_half_private * hf_private = to_hf_private(resp);
|
||||
struct http_session_private * hs_private = to_hs_private(session);
|
||||
struct http_half_private * hf_in_private = to_hf_response_private(hs_private);
|
||||
struct http_half_private * hf_in_req_private = to_hf_request_private(hs_private);
|
||||
struct http_half_private * hf_in_resp_private = to_hf_response_private(hs_private);
|
||||
|
||||
if (hf_in_private != NULL)
|
||||
/* Call at request's callback, early response */
|
||||
if(hf_in_req_private != NULL && hf_in_resp_private == NULL)
|
||||
{
|
||||
if (hf_in_private->stream_action == ACTION_DEFER_DATA)
|
||||
/* Drop the incoming request */
|
||||
if (hf_in_req_private->stream_action == ACTION_DEFER_DATA)
|
||||
{
|
||||
hf_in_private->user_stream_action = ACTION_DROP_DATA;
|
||||
hf_in_private->is_user_stream_action_set = true;
|
||||
hf_in_req_private->user_stream_action = ACTION_DROP_DATA;
|
||||
hf_in_req_private->is_user_stream_action_set = true;
|
||||
}
|
||||
else
|
||||
else assert(0);
|
||||
}
|
||||
|
||||
/* Call at response's callback, replace incoming response */
|
||||
if (hf_in_req_private != NULL && hf_in_resp_private != NULL)
|
||||
{
|
||||
if (hf_in_resp_private->stream_action == ACTION_DEFER_DATA)
|
||||
{
|
||||
assert(0);
|
||||
hf_in_resp_private->user_stream_action = ACTION_DROP_DATA;
|
||||
hf_in_resp_private->is_user_stream_action_set = true;
|
||||
}
|
||||
else assert(0);
|
||||
}
|
||||
|
||||
assert(hs_private->hf_private_resp_user == NULL);
|
||||
|
||||
Reference in New Issue
Block a user