1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

do not drop content-encoding header in case of identity #363

This commit is contained in:
Nikolay Kim
2018-07-06 08:24:36 +06:00
parent 9070d59ea8
commit 185e710dc8
2 changed files with 37 additions and 1 deletions

View File

@ -199,7 +199,10 @@ impl<T: AsyncWrite, H: 'static> Writer for H1Writer<T, H> {
let mut buf = &mut *(buffer.bytes_mut() as *mut [u8]);
for (key, value) in msg.headers() {
match *key {
TRANSFER_ENCODING | CONTENT_ENCODING => continue,
TRANSFER_ENCODING => continue,
CONTENT_ENCODING => if encoding != ContentEncoding::Identity {
continue;
},
CONTENT_LENGTH => match info.length {
ResponseLength::None => (),
_ => continue,