curl-library
Re: Weird FTP Connect Error Bug
Date: Wed, 19 Sep 2007 13:05:16 +0800
On 9/17/07, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Mon, 17 Sep 2007, Jofell Gallardo wrote:
>
> (Please don't top-post: http://curl.haxx.se/mail/etiquette.html#top-post)
Sorry... won't do it again.
> I just downloaded v7.17.0, and it seems to not work either. One funny
> thing
> > also was that anything I use with Cocoa's URL Handler seems to get the
> same
> > errors, and AFAIK, Cocoa's URL Handling also uses curl beneath it, using
> > v7.13.0.
>
> Can you provide source code for us that repeats the problem on a public
> URL?
> Then we can help see if the problem is in your code or if it is a libcurl
> issue.
I dunno if I could help you with this. But I just do the basics... I could
give you a
step-by-step thing that I do with the curl connections here:
(assuming I already init-ed the curl handle:)
curl_easy_reset(chandle);
// SET OPTIONS -- NOTE THAT WE DON'T SET ANY STRINGS DIRECTLY AT THIS STAGE.
// Put error messages here
curl_easy_setopt(chandle, CURLOPT_ERRORBUFFER, &mErrorBuffer);
curl_easy_setopt(chandle, CURLOPT_FOLLOWLOCATION, YES);
curl_easy_setopt(chandle, CURLOPT_FAILONERROR, YES);
// send all data to the C function
curl_easy_setopt(chandle, CURLOPT_WRITEFUNCTION, curlBodyFunction);
curl_easy_setopt(chandle, CURLOPT_HEADERFUNCTION, curlHeaderFunction);
// pass self to the callback
curl_easy_setopt(chandle, CURLOPT_WRITEHEADER, self);
curl_easy_setopt(chandle, CURLOPT_FILE, self);
curl_easy_setopt(chandle, CURLOPT_LOW_SPEED_LIMIT, 1024L);
curl_easy_setopt(chandle, CURLOPT_LOW_SPEED_TIME, 10L);
curl_easy_setopt(chandle, CURLOPT_FORBID_REUSE, 1L);
curl_easy_setopt(chandle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_OLDEST);
curl_easy_setopt([self curl], CURLOPT_FTP_RESPONSE_TIMEOUT, 10L);
curl_easy_setopt([self curl], CURLOPT_FTP_USE_EPSV, 0L);
curl_easy_setopt([self curl], CURLOPT_USERPWD, [unamePword cString]); //
this is Obj-c code
// code for populating the headers here
....
// end headers
curl_easy_setopt(chandle, CURLOPT_HTTPHEADER, htHeaders);
curl_easy_setopt(chandle, CURLOPT_URL, [[pathURL absoluteString] cString]);
// another ObjC-based code
curl_easy_perform(chandle);
// Then I clean up.
I think it's basic stuff right? Also... I confirmed that this behavior also
happens in S3, that whenever
I download 230-234 items, it shows the same error. HTTP-REST and FTP are
very different implementations
but to have similar behavior for number of downloads is quite weird. That
just rules out that the server admins
likes my hair-pulling... :P
I also mentioned this to the cocoadev mailing list, hoping this could be a
mac-only problem. Prolly a file handles
thingy? Anyway... hope this helps.
BTW, will a global cleanup work on this? (A Noob question)
7.13.0 is so outdated it's not even funny.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2007-09-19