curl-users
Re: How to handle service unavailable
Date: Fri, 11 Jul 2008 12:01:06 +0300
On Fri, Jul 11, 2008 at 11:24 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 11 Jul 2008, What you get is Not what you see wrote:
>
>> I need to get some pages from a server. But since too many users are
>> attempting to do this server gives either
>
>> curl: (52) Empty reply from server
>
> No HTTP server should ever cause that return code basically. If it accepts
> the connection, it should response with a proper HTTP response.
>
>> Service Unavailable responses.
>
> That's a 503 HTTP response code I assume?
>
>> For curl is there a way to handle this? I mean if such a response is given
>> then curl will wait or try again to get the correct response? Or any other
>> suggestions handling this situation?
>
> --retry works for the 503 case but not for the error 52. You need to write
> your own script for that.
>
Could you give me some more hints to write down my script?
I wish to use it on a shell. I browsed through the documents
I couldnt find a way to understand what exit code curl gives.
Should I use a programming language for this or the libcurl library?
Or basic bash commands would suffice?
Thanks
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-11