修正HTTP解析层在上层设置请求/应答后,需要等待源站消息完整后才将上层构建的请求/应答发出的问题。

* 现修正,每次调用HTTP解析函数后,无论是否到达消息边界,都检查是否上层是否构建了请求/应答。
This commit is contained in:
luqiuwen
2019-09-09 15:35:40 +08:00
committed by 陆秋文
parent f76720753c
commit 18be5ab07f
2 changed files with 11 additions and 21 deletions

View File

@@ -377,17 +377,6 @@ static int __parser_callback_on_headers_complete(http_parser * parser)
hf_private->stream_action = ACTION_FORWARD_DATA;
}
if (hs_private && hf_direction == TFE_HTTP_REQUEST && hs_private->hf_private_req_user != NULL)
{
http_parser_pause(parser, 1);
assert(hf_private->stream_action != ACTION_FORWARD_DATA);
}
else if (hs_private && hf_direction == TFE_HTTP_RESPONSE && hs_private->hf_private_resp_user != NULL)
{
http_parser_pause(parser, 1);
assert(hf_private->stream_action != ACTION_FORWARD_DATA);
}
return 0;
}