From 01165e08e0d131b399fba2190f17af67e66f0888 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 25 Apr 2005 21:39:48 +0000 Subject: Fred New reported a bug where we used Basic auth and user name and password in .netrc, and when following a Location: the subsequent requests didn't properly use the auth as found in the netrc file. Added test case 257 to verify my fix. --- lib/netrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/netrc.c') diff --git a/lib/netrc.c b/lib/netrc.c index e43140ac3..9b56dd4a2 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -103,7 +103,7 @@ int Curl_parsenetrc(char *host, char *override = curl_getenv("CURL_DEBUG_NETRC"); if (override) { - printf("NETRC: overridden " NETRC " file: %s\n", home); + fprintf(stderr, "NETRC: overridden " NETRC " file: %s\n", override); netrcfile = override; netrc_alloc = TRUE; } @@ -171,7 +171,7 @@ int Curl_parsenetrc(char *host, /* and yes, this is our host! */ state=HOSTVALID; #ifdef _NETRC_DEBUG - printf("HOST: %s\n", tok); + fprintf(stderr, "HOST: %s\n", tok); #endif retcode=0; /* we did find our host */ } @@ -188,7 +188,7 @@ int Curl_parsenetrc(char *host, else { strncpy(login, tok, LOGINSIZE-1); #ifdef _NETRC_DEBUG - printf("LOGIN: %s\n", login); + fprintf(stderr, "LOGIN: %s\n", login); #endif } state_login=0; @@ -197,7 +197,7 @@ int Curl_parsenetrc(char *host, if (state_our_login || !specific_login) { strncpy(password, tok, PASSWORDSIZE-1); #ifdef _NETRC_DEBUG - printf("PASSWORD: %s\n", password); + fprintf(stderr, "PASSWORD: %s\n", password); #endif } state_password=0; -- cgit v1.2.3