mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
Fix panic on unknown content encoding
This commit is contained in:
parent
fee1e255ac
commit
31fbbd3168
@ -1,5 +1,9 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## 0.4.7 (2018-03-xx)
|
||||||
|
|
||||||
|
* Fix panic on unknown content encoding
|
||||||
|
|
||||||
## 0.4.6 (2018-03-10)
|
## 0.4.6 (2018-03-10)
|
||||||
|
|
||||||
* Fix client cookie handling
|
* Fix client cookie handling
|
||||||
|
@ -165,8 +165,7 @@ impl<'a> From<&'a str> for ContentEncoding {
|
|||||||
"br" => ContentEncoding::Br,
|
"br" => ContentEncoding::Br,
|
||||||
"gzip" => ContentEncoding::Gzip,
|
"gzip" => ContentEncoding::Gzip,
|
||||||
"deflate" => ContentEncoding::Deflate,
|
"deflate" => ContentEncoding::Deflate,
|
||||||
"identity" => ContentEncoding::Identity,
|
_ => ContentEncoding::Identity,
|
||||||
_ => ContentEncoding::Auto,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -466,8 +466,8 @@ impl ContentEncoder {
|
|||||||
GzEncoder::new(transfer, Compression::default())),
|
GzEncoder::new(transfer, Compression::default())),
|
||||||
ContentEncoding::Br => ContentEncoder::Br(
|
ContentEncoding::Br => ContentEncoder::Br(
|
||||||
BrotliEncoder::new(transfer, 5)),
|
BrotliEncoder::new(transfer, 5)),
|
||||||
ContentEncoding::Identity => ContentEncoder::Identity(transfer),
|
ContentEncoding::Identity | ContentEncoding::Auto =>
|
||||||
ContentEncoding::Auto => unreachable!()
|
ContentEncoder::Identity(transfer),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user