Message108146
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. |
|
Date |
User |
Action |
Args |
2010-06-18 22:32:26 | vstinner | set | recipients:
+ vstinner |
2010-06-18 22:32:26 | vstinner | set | messageid: <1276900346.42.0.945858543799.issue9032@psf.upfronthosting.co.za> |
2010-06-18 22:32:24 | vstinner | link | issue9032 messages |
2010-06-18 22:32:24 | vstinner | create | |
|