Skip to content

bpo-27777 : cgi.FieldStorage can't parse simple body with Con…#10771

Closed
PierreQuentel wants to merge 2 commits into
python:mainfrom
PierreQuentel:fix-issue-27777
Closed

bpo-27777 : cgi.FieldStorage can't parse simple body with Con…#10771
PierreQuentel wants to merge 2 commits into
python:mainfrom
PierreQuentel:fix-issue-27777

Conversation

@PierreQuentel
Copy link
Copy Markdown
Contributor

@PierreQuentel PierreQuentel commented Nov 28, 2018

…tent-Length and no Content-Disposition.

https://bugs.python.org/issue27777

Comment thread Lib/cgi.py

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

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.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants