curl-users
RE: CURLOPT_URL and CURLOPT_USERPASSWD
Date: Sun, 4 Mar 2001 15:50:00 +0100 (MET)
On Sat, 3 Mar 2001, Frank Reid wrote:
> > Can you give me a short source code example that shows this behaviour?
>
> I'm trying to format my code into something intelligible for posting.
> It's typical spaghetti code from me! Let me understand some things on
> curl_easy, though...
>
> - Does curl_easy_perform() do both ftp-type and http/s-type
> transfers, like curl itself?
Yes it does.
> The http/s stuff seems to work fine, but ftp URLs are where I see
> overruns on the URL buffer. All examples I've found are http-type URLs.
That's just because I am a lousy example writer and no one else has sent me
any better ones!
> - I understand certain parameters, e.g. SSL stuff, headers, etc.,
> are relevant only to http/s... are these ignored if set with
> curl_easy_setopt() or would they cause erratic operation or overflows?
You can set any option with curl_easy_setopt() unregarding which protocol you
intend to use. Only those options that affect the protocol you're using will
be used. There should be no erratic operations or overflows due to setopt()s.
> - Where are the string lengths of the char * buffer limits defined
> for the arguments to curl_easy_setopt()? I've see where they are defined
> as either char *, long or (function *) in curl.h, but I don't see where
> the string lengths are defined.
Most (all?) char * - arguments you pass to libcurl is supposed to point to
zero terminated strings. The strings must remain while libcurl executes, as
libcurl don't copy the strings.
> I've tried both 7.6.1 release as well as current CVS, including what you
> posted yesterday evening. BTW, I noticed you changed the prototype for
> curl_slist_append() but didn't update that in curl.h.
The current CVS may be a bit shaky as lots of things are being moved around
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/Received on 2001-03-04