mirror of
https://github.com/denoland/deno
synced 2024-09-13 05:11:43 +00:00
fix(ext/http): serveHttp brotli compression level should be fastest (#20058)
Use brotli's fastest mode rather than default mode
This commit is contained in:
parent
72d9f06090
commit
8ae7062931
|
@ -743,7 +743,9 @@ fn http_response(
|
|||
let (reader, _) = tokio::io::split(a);
|
||||
let (_, writer) = tokio::io::split(b);
|
||||
let writer: Pin<Box<dyn tokio::io::AsyncWrite>> = match encoding {
|
||||
Encoding::Brotli => Box::pin(BrotliEncoder::new(writer)),
|
||||
Encoding::Brotli => {
|
||||
Box::pin(BrotliEncoder::with_quality(writer, Level::Fastest))
|
||||
}
|
||||
Encoding::Gzip => Box::pin(GzipEncoder::with_quality(
|
||||
writer,
|
||||
Level::Precise(GZIP_DEFAULT_COMPRESSION_LEVEL.into()),
|
||||
|
|
Loading…
Reference in a new issue