在流式发送应答时,不使用GZIP压缩

This commit is contained in:
Lu Qiuwen
2018-10-16 16:37:27 +08:00
parent 2bc366fb13
commit 95c57fe8a5
2 changed files with 15 additions and 10 deletions

View File

@@ -75,8 +75,9 @@ static int __write_http_half_to_line(const struct tfe_stream * stream,
if (hf_private->is_setup_by_stream)
{
/* By stream, first time to write http request/response, construct the header */
if (hf_private->write_ctx == NULL)
/* By stream, first time to write http request/response,
* and has been call body_begin, construct the header */
if (hf_private->evbuf_body != NULL && hf_private->write_ctx == NULL)
{
ret = __write_http_half(hf_private, stream, dir);
if (unlikely(ret < 0)) return ret;