1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-24 22:37:35 +02:00

add client decompression support

This commit is contained in:
Nikolay Kim
2019-03-26 20:45:00 -07:00
parent 2629699b62
commit 1cca25c276
7 changed files with 775 additions and 67 deletions

View File

@ -74,7 +74,7 @@ where
Err(e) => return Err(e.into()),
}
} else {
break;
return Ok(Async::Ready(Some(chunk)));
}
}
Async::Ready(None) => {
@ -150,7 +150,7 @@ impl ContentDecoder {
#[allow(unreachable_patterns)]
fn feed_data(&mut self, data: Bytes) -> io::Result<Option<Bytes>> {
match self {
#[cfg(any(feature = "flate2-zlib", feature = "flate2-rust"))]
#[cfg(feature = "brotli")]
ContentDecoder::Br(ref mut decoder) => match decoder.write_all(&data) {
Ok(_) => {
decoder.flush()?;