cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: curl_multi_info_read

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 20 Dec 2007 08:44:15 +0100 (CET)

On Wed, 19 Dec 2007, McLean, Peter wrote:

> OK....I respectfully disagree though. HTTP error code 403 reads: "The
> server understood the request, but is refusing to fulfill it."

Yes, so there's a HTTP error inside the HTTP protocol stream, but libcurl had
no problems sending the request nor getting the response so nothing went wrong
for libcurl.

> If libcurl is unable to write the data to the URL yet shows the result code
> is CURLE_OK then the result code becomes an unreliable value to check.

Yes, it _is_ an unreliable value to check if you want to know how the
HTTP/server operation was received by the other end. If you want to know how
the HTTP transfer/transaction went, it is all you need to know.

This is how we (I) decided to position libcurl's approach to transfers, by
design. You can add code to get the info you want from this, but using your
approach it would be harder to do the reverse functionality. Like when you
for example _want_ and _expect_ a 403 from the server, then why would libcurl
return an error?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-12-20