cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: using libcurl for HTTP PUT -> but curl_easy_perform always returns CURLE_OK

From: Yehezkel Horowitz <horowity_at_checkpoint.com>
Date: Tue, 3 Jul 2012 14:41:54 +0300

>it returns CURLE_OK although the url i want to upload to is not allowed for upload.
>CURLINFO_RESPONSE_CODE returns 403
>CURLE_HTTP_RETURNED_ERROR or CURLE_UPLOAD_FAILED would be expected.
>Any suggestions for that?

CURLE_OK means that the HTTP transaction completed successfully and you got the response from the server.

You could get the HTTP status code using curl_easy_getinfo (as you did).

Since you have an "easy" way to get this information, I don't think there is a real issue here.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-03