cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with Multi Handle Performing HTTP Multi-Part Post

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 3 May 2002 00:22:36 +0200 (MET DST)

On Wed, 1 May 2002, Gustaf Hui wrote:

> Seems to run into problem when doing HTTP Multi-Part Post using the multi
> handle. I took the sample code which do a Multi-Part Post using only the
> easy handle (that works) and modify it to use curl_multi_perform() instead
> of curl_easy_perform(). When I ran it, there seems to be no HTTP response
> returned, and it will wait forever thinking that some easy handle is still
> running.
>
> Have anyone seen this before? Any idea?

I have not seen this before, but I found a range of problems when digging
into this issue.

I could however successfully perform the operation after my fixes were
committed. I chose not to include the patches in this mail, as I believe you
need other multi-interface related patches (done recently) as well to have
this working properly.

Please get the latest sources off the CVS and try!

THANKS for using the interface, for reporting the problem and for providing a
perfect example of how to repeat the problem you were having!

PS, when calling the curl_multi_perform() function within the select(), when
a socket is ready for operation, check the return code! It will return
CURLM_CALL_MULTI_PERFORM in multiple situations, so it might be an idea to
write the code like this:

        while(CURLM_CALL_MULTI_PERFORM ==
              curl_multi_perform(multi_handle, &still_running));

For maximum speed performance. (I know, my example codes don't do this, but
that's because I'm silly person.)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-03