cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: SIGPIPE downloading with redirection

From: Lluís Batlle i Rossell <viric_at_viric.name>
Date: Mon, 7 Jan 2013 00:17:45 +0100

On Mon, Jan 07, 2013 at 12:06:00AM +0100, Daniel Stenberg wrote:
> On Sun, 6 Jan 2013, Lluís Batlle i Rossell wrote:
>
> >>What on earth would it try to write to it at that point? Can you
> >>strace it and see what the offending attempted write is?
> >
> >No idea. Even using 'http' moves to 'https', and then it sends
> >something ciphered. '5' is the file written to disk. '3' is the
> >first socket. Maybe SSL closing sends something?
>
> Ah yes indeed. It redirects to HTTPS and you're indeed most likely
> seeing an attempted SSL shutdown sequence.
>
> >write(3,
> >"\25\3\1\0\26\244.\177\332\331;\4}U\222\305\305\7\322\360\345\350;\326\264\221\n",
> >27) = -1 EPIPE (Broken pipe)
>
> If I'm not mistaken, you're using a curl built to use OpenSSL which
> doesn't really allow us to use it without risk an EPIPE. The real
> fix here (apart from adding this ability to OpenSSL) I think, is to
> make sure that curl adds a signal handler that ignores EPIPE...
>
> (That's unfortunately not the real fix for libcurl though, but I
> generally blame OpenSSL for now providing this feature, at least
> GnuTLS for example allows us to avoid it completely.)

Humm can't curl just close that socket earlier? That'd do, I guess.

Thank you,
Lluís.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-01-07