1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-05 01:32:31 +00:00

do not set content encoding header for upgraded connection

This commit is contained in:
Nikolay Kim 2017-11-29 19:40:27 -08:00
parent e4f8551cba
commit 6c4fdf604b

View file

@ -459,7 +459,10 @@ impl PayloadEncoder {
} else {
resp.headers.insert(CONNECTION, HeaderValue::from_static("upgrade"));
}
encoding = ContentEncoding::Identity;
if encoding != ContentEncoding::Identity {
encoding = ContentEncoding::Identity;
resp.headers.remove(CONTENT_ENCODING);
}
TransferEncoding::eof()
}
};