curl-library
Windows Multi-curl https curl request overshadowing http request
Date: Sun, 3 Feb 2013 00:15:32 -0800
I am writing application that can connect to the server over http/httpS. I
build these two urls and add it to multi-interface handle. And as soon as I
get response from any URL, I process that data and do rest of the cleanup.
But what I am finding that when httpS url is not reachable and http url is
reachable, it is causing http connection also to timeout.
This is happening on Windows. While Linux and MacOSX seems to be working
fine.
Here is the code snipper that add easy handle to multi-interface.
========= Code Snippet ================
if (starts_with(url, "https")) {
curl_easy_setopt(curlHandle, CURLOPT_SSLVERSION,
CURL_SSLVERSION_SSLv3);
curl_easy_setopt(curlHandle, CURLOPT_SSL_VERIFYPEER, 0L);
}
curl_easy_setopt(curlHandle, CURLOPT_ERRORBUFFER, errorBuffer);
curl_easy_setopt(curlHandle, CURLOPT_URL, url.c_str());
curl_easy_setopt(curlHandle, CURLOPT_WRITEFUNCTION, writeCallback);
curl_easy_setopt(curlHandle, CURLOPT_WRITEDATA, content);
slist = curl_slist_append(slist, "Accept: application/json, text/json");
curl_easy_setopt(curlHandle, CURLOPT_HTTPHEADER, slist);
curl_easy_setopt(curlHandle, CURLOPT_CONNECTTIMEOUT, 5L);
curl_easy_setopt(curlHandle, CURLOPT_NOSIGNAL, 1L);
curl_multi_add_handle(multiHandle_, curlHandle);
========= Code Snippet ================
Is there any option that I am leaving ? or any hint would be appreciated.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-03