Brotli seems to cause issues, disable it

This commit is contained in:
Alex 2021-12-10 00:03:34 +01:00
parent f7a5b29b71
commit e3a030ceaf
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1

View file

@ -190,7 +190,7 @@ async fn try_compress(
.1;
let preference = [
Encoding::Zstd,
Encoding::Brotli,
//Encoding::Brotli,
Encoding::Deflate,
Encoding::Gzip,
];
@ -269,10 +269,10 @@ async fn try_compress(
.insert(header::CONTENT_ENCODING, "gzip".parse()?);
Body::wrap_stream(ReaderStream::new(GzipEncoder::new(body_rd)))
}
Encoding::Brotli => {
head.headers.insert(header::CONTENT_ENCODING, "br".parse()?);
Body::wrap_stream(ReaderStream::new(BrotliEncoder::new(body_rd)))
}
// Encoding::Brotli => {
// head.headers.insert(header::CONTENT_ENCODING, "br".parse()?);
// Body::wrap_stream(ReaderStream::new(BrotliEncoder::new(body_rd)))
// }
Encoding::Deflate => {
head.headers
.insert(header::CONTENT_ENCODING, "deflate".parse()?);