Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-02 Thread Drew Northup
On Mon, Oct 1, 2012 at 10:38 PM, Shawn Pearce spea...@spearce.org wrote: On Mon, Oct 1, 2012 at 3:18 PM, Jeff King p...@peff.net wrote: On Mon, Oct 01, 2012 at 02:23:06PM -0700, Shawn O. Pearce wrote: When libcurl fails to connect to an SSL server always retry the request once. Since the

[PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Shawn O. Pearce
From: Shawn O. Pearce spea...@spearce.org When libcurl fails to connect to an SSL server always retry the request once. Since the connection failed before the HTTP headers can be sent, no data has exchanged hands, so the remote side has not learned of the request and will not perform it twice.

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Junio C Hamano
Shawn O. Pearce spea...@spearce.org writes: Lets assume the site operators (Hi Google!) have a clue and are doing everything they already can to ensure secure, successful SSL connections from a wide range of HTTP clients. Implementing a single level of retry in the client can make it more

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Junio C Hamano
Shawn O. Pearce spea...@spearce.org writes: + for (attempts = 0; attempts 2; attempts++) { + if (start_active_slot(slot)) { + run_active_slot(slot); + if (slot-results-curl_result == CURLE_SSL_CONNECT_ERROR) +

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Jeff King
On Mon, Oct 01, 2012 at 02:23:06PM -0700, Shawn O. Pearce wrote: From: Shawn O. Pearce spea...@spearce.org When libcurl fails to connect to an SSL server always retry the request once. Since the connection failed before the HTTP headers can be sent, no data has exchanged hands, so the

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Jeff King
On Mon, Oct 01, 2012 at 02:53:17PM -0700, Junio C Hamano wrote: Shawn O. Pearce spea...@spearce.org writes: + for (attempts = 0; attempts 2; attempts++) { + if (start_active_slot(slot)) { + run_active_slot(slot); + if

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Oct 01, 2012 at 02:53:17PM -0700, Junio C Hamano wrote: Shawn O. Pearce spea...@spearce.org writes: + for (attempts = 0; attempts 2; attempts++) { + if (start_active_slot(slot)) { + run_active_slot(slot); +

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Drew Northup
On Mon, Oct 1, 2012 at 5:23 PM, Shawn O. Pearce spea...@spearce.org wrote: From: Shawn O. Pearce spea...@spearce.org When libcurl fails to connect to an SSL server always retry the request once. Since the connection failed before the HTTP headers can be sent, no data has exchanged hands, so

Re: [PATCH] Retry HTTP requests on SSL connect failures

2012-10-01 Thread Shawn Pearce
On Mon, Oct 1, 2012 at 3:18 PM, Jeff King p...@peff.net wrote: On Mon, Oct 01, 2012 at 02:23:06PM -0700, Shawn O. Pearce wrote: When libcurl fails to connect to an SSL server always retry the request once. Since the connection failed before the HTTP headers can be sent, no data has exchanged