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.
curl -Z always exits 0
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Jordan Geoghegan via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 12 Apr 2021 18:38:56 -0700
Hello,
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 --fail https://httpbin.org/status/404 || echo FAILED
curl: (22) The requested URL returned error: 404
FAILED
$ curl -Z --fail https://httpbin.org/status/404 || echo FAILED
curl: (22) The requested URL returned error: 404
$ curl --fail -s https://httpbin.org/status/404
$ echo $?
22
$ curl -Z --fail -s https://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.
Regards,
Jordan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-04-13
Date: Mon, 12 Apr 2021 18:38:56 -0700
Hello,
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 --fail https://httpbin.org/status/404 || echo FAILED
curl: (22) The requested URL returned error: 404
FAILED
$ curl -Z --fail https://httpbin.org/status/404 || echo FAILED
curl: (22) The requested URL returned error: 404
$ curl --fail -s https://httpbin.org/status/404
$ echo $?
22
$ curl -Z --fail -s https://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.
Regards,
Jordan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-04-13