This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vila
Recipients gvanrossum, janssen, vila
Date 2007-11-27.14:21:57
SpamBayes Score 0.2129701
Marked as misclassified No
Message-id <1196173318.73.0.236618351417.issue1348@psf.upfronthosting.co.za>
In-reply-to
Content
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...
History
Date User Action Args
2007-11-27 14:21:59vilasetspambayes_score: 0.21297 -> 0.2129701
recipients: + vila, gvanrossum, janssen
2007-11-27 14:21:58vilasetspambayes_score: 0.21297 -> 0.21297
messageid: <1196173318.73.0.236618351417.issue1348@psf.upfronthosting.co.za>
2007-11-27 14:21:58vilalinkissue1348 messages
2007-11-27 14:21:57vilacreate