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 vstinner
Recipients vstinner
Date 2010-06-18.22:32:24
SpamBayes Score 0.03275463
Marked as misclassified No
Message-id <1276900346.42.0.945858543799.issue9032@psf.upfronthosting.co.za>
In-reply-to
Content
Since Python 2.7 / 3.2, httplib supports HTTP(S)/1.1 (keep-alive). This version of HTTP is much faster because the connection is kept between two requests. I'm using it with XML-RPC + SSL (M2Crypto). It works nice.

My problem is when the server closes the connection (eg. the server restarts). If I send a small (XML-RPC) request, sending the request works (I don't understand why, maybe because of a buffer somewhere), but getting the response raises a BadStatusLine because the response is empty (0 byte). If I send a big (XML-RPC) request, sending the request fails with a SSLError(EPIPE, '...') and Transport.request() doesn't retry with a new connection.

I patched my copy of M2Crypto to ensure that SSLError inherits from socket.error, but it's not enough: Transport.request() only catchs errno.ECONNRESET and errno.ECONNABORTED socket errors.

Attached patch catchs also errno.EPIPE. This error is received on sending to the socket whereas the server closed the socket.
History
Date User Action Args
2010-06-18 22:32:26vstinnersetrecipients: + vstinner
2010-06-18 22:32:26vstinnersetmessageid: <1276900346.42.0.945858543799.issue9032@psf.upfronthosting.co.za>
2010-06-18 22:32:24vstinnerlinkissue9032 messages
2010-06-18 22:32:24vstinnercreate