blob: 71297c691bd03f58f51d2690db6e94635c58569d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
diff --git a/contrib/restricted/http-parser/http_parser.c b/contrib/restricted/http-parser/http_parser.c
index 95ff42f783d9..726810366a11 100644
--- a/contrib/restricted/http-parser/http_parser.c
+++ b/contrib/restricted/http-parser/http_parser.c
@@ -1342,6 +1342,12 @@ size_t http_parser_execute (http_parser *parser,
} else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
parser->header_state = h_transfer_encoding;
parser->extra_flags |= F_TRANSFER_ENCODING >> 8;
+ /* Multiple `Transfer-Encoding` headers should be treated as
+ * one, but with values separate by a comma.
+ *
+ * See: https://tools.ietf.org/html/rfc7230#section-3.2.2
+ */
+ parser->flags &= ~F_CHUNKED;
}
break;
|