curl-users
Re: problem parsing netrc in curl
Date: Fri, 9 Mar 2007 23:05:56 +0100 (CET)
On Fri, 9 Mar 2007, mel vernon wrote:
> machine 1.2.3.4
> login "anonymous_at_ftp.somewhere.com S012345"
> password anonymous
> account abc123
>
> I'm trying to attach to the server ftp.somewhere.com
> through a corporate proxy server, 1.2.3.4. The login
> requires the pattern "userid_at_remoteserver proxy_acct"
> for the user login (anonymous_at_ftp.somewhere.com
> S012345). Curl strips off the user string at the
> first blank, so it is sending
> anonymous_at_ftp.somewhere.com as the user, not
> anonymous_at_ftp.somewhere.com S012345. This causes the
> connection to the proxy server to fail.
Yeps, the netrc parser doesn't deal with the quoted string case at all!
> Second problem is that I have to add the proxy account password string to
> the command line (abc123). Does curl read the account line in the .netrc,
> or is all getting corrupted by the blank in the login line?
It doesn't read the account line at all!
> I'm not using a .curlrc file, but can (if i could find out the syntax)
You can work around both these flaws by putting the necessary command lines in
a "config file" and use -K.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-03-09