[3.8] bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) by miss-islington · Pull Request #20891 · python/cpython
In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH
header, this fix remove this header as required and fix FieldStorage
read_lines_to_outerboundary, by not using limit when it's negative,
since by default it's -1 if not content-length and keeps substracting what
was read from the file object.
Also added a test case for this problem.
(cherry picked from commit d8cf351)
Co-authored-by: roger rogerduran@gmail.com