[issue6791] httplib read status memory usage
report at bugs.python.org
Thu Dec 16 18:06:23 CET 2010
Senthil Kumaran <orsenthil at gmail.com> added the comment:
On Thu, Dec 16, 2010 at 02:02:10PM +0000, Antoine Pitrou wrote:
> I don't think you understood the issue here. Calling readline() without
> a maximum length means the process memory potentially explodes, if the
> server sends gigabytes of data without a single "\n".
Yeah, I seem to have misunderstood the issue. Even if the response wa
s an *invalid* one but it was huge data without \n, the readline call
would just explode.
- reading chunked response is doing a readline call too.
Both this need to be addressed by having a limit on reading.
I thought readline() is being called only when parsing headers which
should almost always have CRLF (or at least LF) and thought valid
responses always start with headers.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list