[wpinet] http_parser: unset F_CHUNKED on new Transfer-Encoding (#7985)

This commit is contained in:
Phuc-Thanh Nguyen
2025-05-23 05:43:20 +08:00
committed by GitHub
parent b4823569a4
commit abd312f3d0

View File

@@ -1326,6 +1326,12 @@ reexecute:
parser->header_state = h_general;
} else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
parser->header_state = h_transfer_encoding;
/* 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;