RE: ftp upload results in (nil) filename
Date: Tue, 4 Feb 2003 09:58:44 -0500
> You specify it in the full URL. The file name part, the right-most one,
> what it'll use on the remote site. Your URL ends with a slash, which thus
> makes the file-part a NULL (written as "(nil)" by the sprintf() code).
Sigh... I had tried this and it didn't work. As it turns out, it was
because the char* was being free'd and curl wasn't liking that.
Restructured things and it's just fine now. Curl not copying strings is
particularly unfriendly to C++, but I can understand the memory and speed
> If you can think of a place and wording to add to the docs to make this
> clear, please tell me!
I would suggest making a note of it under CURLOPT_UPLOAD, saying that you
should specify the remote filename in the URL. Although, really, it is
common sense and it was just a bug that prevented me from using it when I
> > Speaking of which, the current curl_easy_setopt page on the web
> > (http://curl.sourceforge.net/libcurl/c/curl_easy_setopt.html -
> didn't check
> > SE or other versions) is missing sections due to bad HTML - notably
> > CURLOPT_READDATA and anything else near a "NOTE" section. The
> man pages are
> > fine though.
> Hm. Weird. The haxx.se version seems to be fine! I'll investigate.
Correction, it's not bad HTML... it's just not there at all. Here's a
snippet of what I see (under CURLOPT_READFUNCTION):
---- plied with nmemb number of bytes. Your function must return the actual number of bytes that you stored in LOPT_INFILE, the name CURLOPT_READDATA was introduced in 7.9.7. ---- The first two lines are from the CURLOPT_READFUNCTION description, the last two are from the CURLOPT_READDATA description. Only SE is correct. Both the US and AU mirrors are broken. If you want me to mail curl-web about this, I'll go ahead and take care of it. Thanks for the response. I'll go look stupid somewhere else now :) Tom Sorensen ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.comReceived on 2003-02-04