cURL / Mailing Lists / curl-library / Single Mail


Re: Error returns are dropped

From: Daniel Stenberg <>
Date: Tue, 1 May 2007 16:44:54 +0200 (CEST)

On Tue, 1 May 2007, Cary Fitzhugh wrote:

> We have a client which connects using libcurl. At times, we receive a 4XX
> response code. And in that response message there is some data, like why
> things failed, etc. It seems that we can't get libcurl to give us that data
> back. It appears that once libcurl sees the 4XX response it just drops the
> message body or closes the connection. Is there a flag or something we can
> set which will allow that data to be read?

libcurl _does not_ drop the connection on 4xx returns, it only does that if
you ask it to with the CURLOPT_FAILONERROR option. By default, libcurl
provides the exact same response and data for 4XX as for 3XX or 2XX etc...

  Commercial curl and libcurl Technical Support:
Received on 2007-05-01