修正HTTP Early Answer功能在HTTP头部带有Body时的引发assert的问题。

* 原实现无法正确处理HTTP请求带有Body时,业务层执行Early Answer动作;
* 现修正为HTTP请求头完整时,检查是否需要Early-Answer。如果请求已经向真实服务器转发,则不执行Early-Answer动作。
This commit is contained in:
Lu Qiuwen
2018-10-25 10:54:53 +08:00
parent 09cac7256b
commit 2cea50f48c
2 changed files with 18 additions and 12 deletions

View File

@@ -871,7 +871,6 @@ void hs_ops_response_set(struct tfe_http_session * session, struct tfe_http_half
hf_in_req_private->user_stream_action = ACTION_DROP_DATA;
hf_in_req_private->is_user_stream_action_set = true;
}
else assert(0);
}
/* Call at response's callback, replace incoming response */
@@ -882,7 +881,6 @@ void hs_ops_response_set(struct tfe_http_session * session, struct tfe_http_half
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);