curl-library
CURLAUTH_ANY and CURLOPT_UPLOAD not working
Date: Fri, 16 Mar 2012 15:54:09 +0100
Hello,
It seems it is not possible to use them together : Using wireshark, I
can see that curl tries only once to connect to the server (it does not
retry after receiving the 401 http error).
I find an old post, http://curl.haxx.se/mail/lib-2004-06/0187.html
(CURLAUTH_ANY Hangs on CURLOPT_PUT) - may be it is (still) related ?
I'm using libcurl coming with ubuntu packages (7.21.6)
The program does the following calls :
{{{
[...]
CURL * curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ignoreContent);
curl_easy_setopt(curl, CURLOPT_URL, uri);
curl_easy_setopt(curl, CURLOPT_HEADER, 0);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, readContent);
curl_easy_setopt(curl, CURLOPT_READDATA, content);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
CURLcode curl_ret = curl_easy_perform(curl);
unsigned long http_code = 0;
curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
[...]
}}}
Note: If I specify CURLAUTH_BASIC with CURLOPT_UPLOAD, it is working
well (that's our workaround)
Any ideas,
Thanks,
sym39
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-16