aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 4771b3b97..038a02d43 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4452,7 +4452,7 @@ static CURLcode set_userpass(struct connectdata *conn,
const char *user, const char *passwd)
{
/* If our protocol needs a password and we have none, use the defaults */
- if((conn->handler->protocol & (CURLPROTO_FTP|CURLPROTO_IMAP)) &&
+ if((conn->handler->flags & PROTOPT_NEEDSPWD) &&
!conn->bits.user_passwd) {
conn->user = strdup(CURL_DEFAULT_USER);