adafruit / Adafruit_CircuitPython_Requests

Requests-like interface for web interfacing
MIT License
51 stars 37 forks source link

Add, test support for chunk extensions #46

Closed jepler closed 3 years ago

jepler commented 3 years ago

The chunk line is read up to the terminating "\r\n", then any extensions are ignored by only using the string up to the first ";" (if any) when determining the length of the chunk.

Resources: https://tools.ietf.org/html/rfc7230#section-4.1.1 https://www.boost.org/doc/libs/1_74_0/libs/beast/doc/html/beast/using_http/chunked_encoding.html

Thanks to @anecdata for asking on Discord why ";" was getting special treatment, leading to this investigation. We don't know of a specific URL or service that is affected by this bug.

tannewt commented 3 years ago

@jepler Are you going to follow up on this?