curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: curl -Z always exits 0

From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Tue, 13 Apr 2021 01:59:32 -0400

On 4/12/2021 9:38 PM, Jordan Geoghegan via curl-users wrote:
> I was hoping to get a sanity check here regarding semantics with the -Z/--parallel flag.
>
> I'm using curl to download multiple files over HTTPS in a script, and I've found that no matter what, curl when invoked with -Z/--parallel always exits with a zero code. More specifically, it seems that the '--fail' and '--fail-early' flags have no effect when curl is invoked with -Z/--parallel:
>
> $ curl --failhttps://httpbin.org/status/404 || echo FAILED
> curl: (22) The requested URL returned error: 404
> FAILED
>
> $ curl -Z --failhttps://httpbin.org/status/404 || echo FAILED
> curl: (22) The requested URL returned error: 404
>
> $ curl --fail -shttps://httpbin.org/status/404
> $ echo $?
> 22
>
> $ curl -Z --fail -shttps://httpbin.org/status/404
> $ echo $?
> 0
>
> Is this is a bug, or am I just holding it wrong?
>
> My tests were run on an OpenBSD 6.8 machine with the following 'curl -V' output:
>
> curl 7.72.0 (x86_64-unknown-openbsd6.8) libcurl/7.72.0 LibreSSL/3.2.2 zlib/1.2.3 nghttp2/1.41.0
> Release-Date: 2020-08-19
> Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
> Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets
>
> Any insight or advice would be greatly appreciated.


I can't reproduce. I'd guess it was fixed by 8a964cb [1] (precedes
curl-7_76_0).

[1]: https://github.com/curl/curl/commit/8a964cb

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-04-13