summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index a767f0212..864d0a69c 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2887,11 +2887,13 @@ static CURLcode override_login(struct Curl_easy *data,
char **passwdp = &conn->passwd;
char **optionsp = &conn->options;
+#ifndef CURL_DISABLE_NETRC
if(data->set.use_netrc == CURL_NETRC_REQUIRED && conn->bits.user_passwd) {
Curl_safefree(*userp);
Curl_safefree(*passwdp);
conn->bits.user_passwd = FALSE; /* disable user+password */
}
+#endif
if(data->set.str[STRING_OPTIONS]) {
free(*optionsp);
@@ -2900,6 +2902,7 @@ static CURLcode override_login(struct Curl_easy *data,
return CURLE_OUT_OF_MEMORY;
}
+#ifndef CURL_DISABLE_NETRC
conn->bits.netrc = FALSE;
if(data->set.use_netrc && !data->set.str[STRING_USERNAME]) {
bool netrc_user_changed = FALSE;
@@ -2925,6 +2928,7 @@ static CURLcode override_login(struct Curl_easy *data,
conn->bits.user_passwd = TRUE; /* enable user+password */
}
}
+#endif
/* for updated strings, we update them in the URL */
if(*userp) {