cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl with silent option is outputting data when it should not

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Wed, 22 May 2013 17:18:36 +0200

On Wednesday 22 May 2013 15:56:56 James.Youngman_at_sungard.com wrote:
> Unfortunately this will also redirect some error output which I do want to
> see. I tried this using an invalid IP address and the ERROR 404 message
> was redirected to null. :-(

You are not redirecting any error output but the actual body of the response.
If you want curl to treat 404 as error, you can use the --fail option, which
will cause curl to return a non-zero exit code in that case.

Kamil
-------------------------------------------------------------------
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-05-22