cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Automatic retry with server errors

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 23 Dec 2010 13:02:41 +0100 (CET)

On Thu, 23 Dec 2010, Johan van Selst wrote:

> However, it would be nice if libcurl could also connect automatically to the
> next server if it gets an SSL authentication failure or an HTTP 500 error
> code (i.e. one of the server is borked). I could write code to handle this
> event in my application, but since DNS is handled by curl, and curl is used
> by many applications, it makes sense to implement this feature directly in
> curl.

HTTP 500 and SSL auth problems are very generic and even if you have a use for
this exact case I bet others will want it done differently.

What I mean is, I would like to come up with a way where libcurl returns the
errors exactly like today and then allow the application to use the next
round-robin IP address on a request that's reusing the same handle and host.
If we can think of a way to accomplishes that cleanly.

> And would you be willing to accept a patch in curl if I wrote something that
> does this? (assuming the code itself would be sensible).

Sure!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-12-23