diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs index f188efa5a5..ca8e52c30d 100644 --- a/src/proto/h1/role.rs +++ b/src/proto/h1/role.rs @@ -204,6 +204,8 @@ impl Http1Transaction for Server { if headers::is_chunked_(&value) { is_te_chunked = true; decoder = DecodedLength::CHUNKED; + } else { + is_te_chunked = false; } } header::CONTENT_LENGTH => { @@ -1334,6 +1336,16 @@ mod tests { "transfer-encoding doesn't end in chunked", ); + parse_err( + "\ + POST / HTTP/1.1\r\n\ + transfer-encoding: chunked\r\n\ + transfer-encoding: afterlol\r\n\ + \r\n\ + ", + "transfer-encoding multiple lines doesn't end in chunked", + ); + // http/1.0 assert_eq!(