ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

Trailling spaces after chunk size, but before CRLF not allowed

Open ognjenMarinkovic27 opened this issue 2 years ago • 0 comments

In the implementation of ESPAsyncWebServer, spaces may be added to the end of HTTP chunk sizes, but before CRLF. This can usually be parsed by browsers but can cause bugs in certain cases (For example: Dart http library).

According to the HTTP/1.1 specification (RFC 7230), the chunk size in the chunked transfer encoding must be followed by a CRLF (carriage return + line feed) sequence. The specification does not allow trailing spaces after the chunk size before the CRLF.

ognjenMarinkovic27 avatar Jul 13 '23 16:07 ognjenMarinkovic27