vila added the comment:
Well I was confused.
In fact, I have a working http/1.1 client which indeed works around that
HTTPConnection.close() must be called once the response has been
processed or the next request can't be handled since
HTTPConnection.__state is not _CS_IDLE.
That may be a different problem than the one Bill is after though.
I work around it by saving the sock attribute before the call in a class
inherited from HTTPConnection:
# Preserve our preciousss
sock = self.sock
self.sock = None
# Let httplib.HTTPConnection do its housekeeping
# Restore our preciousss
self.sock = sock
So not doing the close() is harmless but doing self.sock = None in
HTTPConnection.close() still break hopes of persistent connections.
May be that method should be splitted...
Tracker <[EMAIL PROTECTED]>
Python-bugs-list mailing list