cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: re-using connection with authentication

From: Sigrid Thijs <sigrid.thijs_at_androme.com>
Date: Mon, 26 Mar 2007 09:19:02 +0200

Daniel Stenberg wrote:
> On Wed, 14 Mar 2007, Sigrid Thijs wrote:
>
>> see attachment. To reproduce this, you should fill in the url and
>> login in the main function.
>
> There's one flaw in your code: you don't loop properly when
> CURLM_CALL_MULTI_PERFORM is returned from curl_multi_perform(). When I
> changed the if() to a while(), I can't see any problems.
>

I've changed this:

if ( code == CURLM_CALL_MULTI_PERFORM )
   code = curl_multi_perform ( m_pMultiCURL, &busyHandleCount );

to:

while ( code == CURLM_CALL_MULTI_PERFORM )
   code = curl_multi_perform ( m_pMultiCURL, &busyHandleCount );

But I still get the same result: the second request is sent without body
and a 400 response is returned.

kind regards,
Sigrid Thijs

> And btw, Sleep(100) is not a god substitute for select() or similar.
>
Received on 2007-03-26