curl-users
Re: curl exit status on curl: (18) server did not report OK, got 426
Date: Fri, 22 Mar 2019 23:15:09 -0400
On 3/22/2019 6:58 PM, Kevin R. Bulgrien wrote:
> I think `curl -asdf` is a suggestion to continue the aborted download
> to see
> if the rest of the file can be obtained. This fault occurred during
> an automated
> process I was notified after support personnel cleared the error
> condition. To
> try that, I guess I'd have to analyze console output in the script and
> spawn
> another command... but it seems simpler just to retry the transmission, so
> I'm not sure how that is supposed to help. The file is small enough that
> retry is not at all a problem.
I was suggesting you try any curl command that will exit in error to see
if the result was still 0 to determine if it's your script. curl -asdf
could actually be valid so it was a poor example, my apologies. You
could simply use 'curl' without any arguments and that should cause the
exit code to be 2. Without seeing your full script we can't say. What
Daniel pointed out is spot-on though, no other commands must occur
between the command you want the exit code for and $? since $? is only
for the last known command.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-03-23