Idea #7697
Updated by Tom Clegg about 9 years ago
History: we added brute-force socket error retry handling in #7587. We want to improve it to use the same rules we're using in the Go SDK in #5538. Modify _intercept_http_request to do the following: * If we're about to do a POST or DELETE, and (as far as we know) the http client's underlying socket has been idle open for more than 30 seconds, a while, close its socket. it. (httplib2 will automatically open a new one to make the request.) It might be hard to tell how long the socket has been idle: "we haven't used the http client for 30 seconds, and the socket is idle right now" might be a good enough approximation. * Retry BadStatusLine and socket.error the same way as we currently do, but only if the original request was idempotent (i.e., HEAD, GET, or PUT).