vila added the comment:
Well I was confused.
In fact, I have a working http/1.1 client which indeed works around that
close.
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
self.close()
# 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]>
<http://bugs.python.org/issue1348>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com