cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: $HOME patches

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 6 Nov 2003 08:37:39 +0100 (CET)

On Tue, 28 Oct 2003, Gisle Vanem wrote:

> I've patched libcurl with a new function 'curl_get_homedir()' to hide the
> details and support Windows users which normally doesn't ever set a $HOME.

It struck me while I was going through this for the 17th time in my head,
trying to sort out what I think we should do to incorporate this change the
best possible way, that perhaps we should not at all try to detect the HOME
dir in the library?!

Since libcurl is a multi platform library used on numerous platforms and
environments, it makes sense to not attempt to make it use or assume a home
dir concept of its own.

The only thing in libcurl that uses the home directory, is the .netrc parser
that uses the info to find the correct file name.

I think I would rather prefer to have the client either pass the "home dir" to
the library, or perhaps even more specific the "netrc file name". An even
bigger change could be to offer a separate interface to the netrc parsing so
that a client can do "curl_parse_netrc()" and then pass in the user name and
password (and whatever) to the library as the application author thinks is
good.

Since this would affect only applications that uses netrc parsing, I'm
interested in feedback from people who use that. For the purpose of the curl
tool, I write both ends so it really is no big deal! ;-)

-- 
 Daniel - been obfuscating curl source code since 1998.
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Received on 2003-11-06