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.
|
|
||
| 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
mannequin
mentioned this pull request
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters