Gregory P. Smith <g...@krypto.org> added the comment: Okay, I do not think this has been fixed yet. Anyone calling getresponse() can indeed use buffering=True, it can mess things up if the do not close the connection afterwards.
The addition of the sockbuf parameter to HTTPConnection as proposed in buffered_socket.diff will work, but I'd follow the earlier work's lead. Don't expose it as the "sockbuf" integer. Just use a boolean "buffering" parameter that defaults to False. When true, do the same thing you do with sockbuf != 0. I see little value in actually being able to specify the exact buffer size used on the internal makefile on the HTTPConnection. The default will be sufficient. If you still want the user to be able to control it, perhaps add a HTTPConnection class attribute that defaults to -1 (socket.socket.makefile()'s bufsize default value) that you pass to makefile. Users can subclass HTTPConnection and give it a new value in that case. Personally I'd call that overkill. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2576> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com