1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-30 03:44:27 +02:00

Fix streaming response with body compression

This commit is contained in:
Nikolay Kim
2018-05-21 20:50:10 -07:00
parent 76d790425f
commit 2159158c30
3 changed files with 28 additions and 2 deletions

View File

@ -505,6 +505,11 @@ impl ContentEncoder {
}
TransferEncoding::eof(buf)
} else {
if !(encoding == ContentEncoding::Identity
|| encoding == ContentEncoding::Auto)
{
resp.headers_mut().remove(CONTENT_LENGTH);
}
ContentEncoder::streaming_encoding(buf, version, resp)
}
}