Visitar URL original
bpo-27777 : cgi.FieldStorage can't parse simple body with Con… by PierreQuentel · Pull Request #10771 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20250423192647/https://github.com/python/cpython/pull/10771
Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

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

wants to merge 2 commits into from

Conversation

PierreQuentel
Copy link
Contributor

@PierreQuentel PierreQuentel commented Nov 28, 2018 •

…tent-Length and no Content-Disposition.

https://bugs.python.org/issue27777

@@ -661,11 +661,9 @@ def read_multi(self, environ, keep_blank_values, strict_parsing):

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

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