curl-library
Re: Windows Multi-curl https curl request overshadowing http request
Date: Mon, 4 Feb 2013 16:18:20 -0800
In Pseudo Form it goes something like this
fetchNextAvailCurlHandle(void) {
CurlHandleState* curlHandle = NULL;
int32_t numHandles = 0;
do {
while (curl_multi_perform(multiHandle_, &numHandles) ==
CURLM_CALL_MULTI_PERFORM);
// Read multi_info_read for ant valid handle
if ((curlHandle = getAvailableHandleState()) != NULL) {
// We found the response, from handle, start using it
break;
} else if (numHandles != 0) {
curl_multi_wait(multiHandle_, NULL, 0, 5000, NULL);
}
} while (numHandles);
return curlHandle;
}
getAvailableHandleState() {
CurlHandleState* curlHandle = NULL;
int32_t numMsgs;
CURLMsg* curlMsg;
while ((curlMsg =
curl_multi_info_read(multiHandle_, &numMsgs)) != NULL) {
if (curlMsg->msg == CURLMSG_DONE) {
curlHandle = findCurlHandle(curlMsg->easy_handle);
if (curlHandle == NULL) {
continue;
}
CURLcode curlCode = curlMsg->data.result;
if (curlCode == CURLE_OK) {
break;
} else {
// LOG ERROR
curlHandle = NULL
}
}
}
return curlHandle;
}
On Mon, Feb 4, 2013 at 3:15 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 4 Feb 2013, Vijay Panghal wrote:
>
> We are using libcurl 7.28.1 with OpenSSL and default windows resolver.
>>
>
> Ok, great. Can you also show us a complete example source code that
> repeats this problem if pointed a non-responding HTTPS site and a
> responding HTTP one?
>
>
> --
>
> / daniel.haxx.se
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-05