diff --git a/src/http/h1/parse.rs b/src/http/h1/parse.rs index 4c08e80a8b..07867b3d29 100644 --- a/src/http/h1/parse.rs +++ b/src/http/h1/parse.rs @@ -188,8 +188,9 @@ impl Http1Message for ClientMessage { body = Encoder::chunked(); let encodings = match head.headers.get_mut::() { Some(encodings) => { - //TODO: check if Chunked already exists - encodings.push(header::Encoding::Chunked); + if !encodings.contains(&header::Encoding::Chunked) { + encodings.push(header::Encoding::Chunked); + } true }, None => false