use ZlibDecoder for deflate responses (#1257)
This commit is contained in:
		| @@ -10,7 +10,7 @@ use async_compression::tokio::bufread::GzipDecoder; | ||||
| use async_compression::tokio::bufread::BrotliDecoder; | ||||
|  | ||||
| #[cfg(feature = "deflate")] | ||||
| use async_compression::tokio::bufread::DeflateDecoder; | ||||
| use async_compression::tokio::bufread::ZlibDecoder; | ||||
|  | ||||
| use bytes::Bytes; | ||||
| use futures_core::Stream; | ||||
| @@ -57,7 +57,7 @@ enum Inner { | ||||
|  | ||||
|     /// A `Deflate` decoder will uncompress the deflated response content before returning it. | ||||
|     #[cfg(feature = "deflate")] | ||||
|     Deflate(FramedRead<DeflateDecoder<StreamReader<Peekable<IoStream>, Bytes>>, BytesCodec>), | ||||
|     Deflate(FramedRead<ZlibDecoder<StreamReader<Peekable<IoStream>, Bytes>>, BytesCodec>), | ||||
|  | ||||
|     /// A decoder that doesn't have a value yet. | ||||
|     #[cfg(any(feature = "brotli", feature = "gzip", feature = "deflate"))] | ||||
| @@ -321,7 +321,7 @@ impl Future for Pending { | ||||
|             )))), | ||||
|             #[cfg(feature = "deflate")] | ||||
|             DecoderType::Deflate => Poll::Ready(Ok(Inner::Deflate(FramedRead::new( | ||||
|                 DeflateDecoder::new(StreamReader::new(_body)), | ||||
|                 ZlibDecoder::new(StreamReader::new(_body)), | ||||
|                 BytesCodec::new(), | ||||
|             )))), | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user