aboutsummaryrefslogtreecommitdiff
path: root/lib/netrc.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-25 21:39:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-25 21:39:48 +0000
commit01165e08e0d131b399fba2190f17af67e66f0888 (patch)
treeedabecf2359b409ed1e10f450ace39e859a31807 /lib/netrc.c
parent6e1633a6c5f88479998a1e0675818c9d97d9ed90 (diff)
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.
Diffstat (limited to 'lib/netrc.c')
-rw-r--r--lib/netrc.c8
1 files changed, 4 insertions, 4 deletions
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;