http-parser icon indicating copy to clipboard operation
http-parser copied to clipboard

http-parser fails to detect chunked encoding at the end of a list

Open vinniefalco opened this issue 9 years ago • 1 comments

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.

vinniefalco avatar Jun 02 '16 08:06 vinniefalco

Confirmed, bug.

indutny avatar Jun 14 '17 21:06 indutny