Hi,
Am 20.03.2013 19:10, schrieb Harald Latzko:
curl_global_init(CURL_GLOBAL_ALL);
curl_handle = curl_easy_init();
curl_easy_setopt(curl_handle, CURLOPT_URL, url);
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, 1);
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl_handle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP |
CURLPROTO_HTTPS);
So I would expect that the target ressource would be retrieved
successfully, but I'm receiveing an HTTP 302 return code. What am I
doing wrong?
option params are long [1]; try:
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L);
Gün.
[1] http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html