Open
Description
Additional validation of Content-Length parsing was introduced in bf90f3a however, the value is not strip
ed and therefore a value of '0 '
causes a ValueError
.
This is a particular issue because if Content-Length
is the last header in a request and parse_line
is being called then the \r\n
of the end of the header is interpreted as a multi-line continuation and appends the space to the end in HTTPHeaders.parse_line
: new_part = " " + line.lstrip()
.