cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Problem with libcURL resuming transfer after doing adirectorylisting...

From: David Fix <5z32rcl02_at_sneakemail.com>
Date: Wed, 27 Apr 2005 20:21:08 -0400

Is THAT all? Gah. :P Ok, cool, thanks! :) I'll give it a try and let
you know if it works. :) Which I'm sure it will, that totally makes sense.
:) I had a feeling it might be that, but I've been beating myself too hard
over the head to TRY it. :D

        Dave
-----Original Message-----
Sent: Wednesday, April 27, 2005 8:10 PM
Subject: Re: Problem with libcURL resuming transfer after doing
adirectorylisting...

On Wed, Apr 27, 2005 at 07:13:42PM -0400, David Fix wrote:
> Alright, here's the EXACT code (with a working URL and everything) that I
> used to make this happen...
> If you try this, you'll see that it hangs when it goes to retrieve the
file
> after getting the directory listing.
> Let me know if you have any ideas, please! :)

You're reusing the curl handle from within the write callback. When the
callback returns, curl tries to continue with the transfer that caused the
write call, but the handle is then in a completely different state. No
wonder
this doesn't work.

If you want to do another transfer within the callback, you'll need to
create
a new curl handle. But a better way is probably to set a flag within the
callback and do the second transfer in your main code after the first
curl_easy_perform() call returns.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2005-04-28