cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: No Errorcode in commandline will be returned even http errors occ ured

From: TP <thomas.prager_at_kirchnersoft.com>
Date: Mon, 30 Oct 2006 08:58:47 +0100

Message: 4
Date: Wed, 25 Oct 2006 16:39:51 +0200 (CEST)
From: Daniel Stenberg <daniel_at_haxx.se>
Subject: Re: No Errorcode in commandline will be returned even http
        errors occ ured
To: the curl tool <curl-users_at_cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0610251638430.30546_at_yvahk3.pbagnpgbe.fr>
Content-Type: text/plain; charset="iso-8859-1"

On Wed, 25 Oct 2006, Daniel Stenberg wrote:

>> I?m using curl f?r commandline (Version 7.15.4). When I try to upload to
a
>> http - webspace i see the error "HTTP/1.1 401 Unauthorized" but the
>> returncode is 0, although the comandlineparameter -f is set.
>
>...
>
>> How can I detect this error from the commandline?
>
>This is a bug in libcurl (for the 401 response code), so you need to make a

>work-around. I think you can use -w to get the HTTP response code and use
that
>to detect this problem.
...
This option will only write this information to the stout, or not? So my
only possibility is to parse the output and decide with an external script
if an error has occured or not.
Exists any other workaround, which makes not necessary to develop an
external script?
Received on 2006-10-30