http-parser
http-parser copied to clipboard
http-parser fails to detect chunked encoding at the end of a list
Given the header:
Transfer-Encoding: gzip, chunked\r\n
The parser will not set chunked encoding when it should: https://tools.ietf.org/html/rfc7230#section-3.3.1
Encodings are applied left to right and removed from right to left. If the parser encounters the chunked token as the last item when the Transfer-Encoding value is a comma separated list, it should consider the message body to be chunk encoded.
I haven't actually tried this so I might be wrong but I see no code for finding a comma in Transfer-Encoding. However, the parser DOES handle comma separated lists correctly for the Connection header.
Confirmed, bug.