mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-02 01:05:08 +02:00
use custom headers map; more optimizations
This commit is contained in:
@ -55,7 +55,7 @@ where
|
||||
#[inline]
|
||||
pub fn from_headers(stream: S, headers: &HeaderMap) -> Decoder<S> {
|
||||
// check content-encoding
|
||||
let encoding = if let Some(enc) = headers.get(CONTENT_ENCODING) {
|
||||
let encoding = if let Some(enc) = headers.get(&CONTENT_ENCODING) {
|
||||
if let Ok(enc) = enc.to_str() {
|
||||
ContentEncoding::from(enc)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user