summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-02-08 13:53:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-02-08 13:53:13 +0000
commitb12e334d83c0ad2a342eeb14c1cecf314915830f (patch)
treefd5dd79aee45a6eb254713567941303e427a2089
parent7e36c4437e895db51efe92cbe0bb1fdd41981b23 (diff)
downloadgnurl-b12e334d83c0ad2a342eeb14c1cecf314915830f.tar.gz
gnurl-b12e334d83c0ad2a342eeb14c1cecf314915830f.tar.bz2
gnurl-b12e334d83c0ad2a342eeb14c1cecf314915830f.zip
if netrc is parsed and our host was found in there, set data->bits.user_passwd
unconditioanlly!
-rw-r--r--lib/url.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index 74a69050a..83aa6e3b2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1086,15 +1086,15 @@ static CURLcode _connect(CURL *curl, CURLconnect **in_connect)
infof(data, "Couldn't find host %s in the .netrc file, using defaults",
data->hostname);
}
+ else
+ data->bits.user_passwd = 1; /* enable user+password */
+
/* weather we failed or not, we don't know which fields that were filled
in anyway */
if(!data->user[0])
strcpy(data->user, CURL_DEFAULT_USER);
if(!data->passwd[0])
strcpy(data->passwd, CURL_DEFAULT_PASSWORD);
- if(conn->protocol&PROT_HTTP) {
- data->bits.user_passwd = 1; /* enable user+password */
- }
}
else if(!(data->bits.user_passwd) &&
(conn->protocol & (PROT_FTP|PROT_HTTP)) ) {