curl-library
Re: libcurl/openssl crashes when remote site partially goes down
Date: Thu, 17 Jan 2008 13:50:38 +0100
Well, I would at least expect that it would return with an error code and
not just stop executing the program in the middle of a routine. If this
routine is incorporated in a larger application it means that everything
running in that process will stop. It would be good to have a way to catch
the error.
/Magnus
On Jan 17, 2008 1:36 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 17 Jan 2008, Magnus Cederlöf wrote:
>
> > I have an application with libcurl/openssl that makes an HTTP POST to a
> > remote machine over HTTPS. This remote machine has stunnel + a special
> HTTP
> > server (without SSL support). If the HTTP server on the remote machine
> goes
> > down, but stunnel is still up and running, libcurl/openssl in my
> application
> > crashes (makes an exit).
>
> libcurl returns, that's not a crash...
>
> > When stunnel has been started but there is nothing at the other end of
> the
> > SSL tunnel, libcurl/openssl will make an exit with the following
> printout:
> > * SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
> > * Empty reply from server
> > * Connection #0 to host localhost left intact
> > * Server returned nothing (no headers, no data)
> > * Closing connection #0
>
> What would you expect libcurl to do when it sends a HTTP request and it
> gets
> nothing back? I don't see the error here...!
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-01-17