bpo-27777 : cgi.FieldStorage can't parse simple body with Con… by PierreQuentel · Pull Request #10771 · python/cpython

Conversation

…tent-Length and no Content-Disposition.

ar45


def read_single(self):
"""Internal: read an atomic part."""
self.read_lines()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested this patch locally. Seems like with some clients, the webserver will not get a EOF if the client sent content-length header. So the this will result in an indefinite block on fp.readline(). We should honor the content-length, and not try to read more than that in any case.

@rr rr mannequin mentioned this pull request

Apr 11, 2022

This pull request was closed.

Labels