Skip to content

Commit

Permalink
url: use blank credentials when using proxy w/o username and password
Browse files Browse the repository at this point in the history
Fixes proxy regression brought in commit ad829b2 (7.71.0)

Fixed #5911
Closes #5914
  • Loading branch information
Diven Qi authored and bagder committed Sep 7, 2020
1 parent 6f42e3b commit 3532262
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/url.c
Expand Up @@ -2379,8 +2379,10 @@ static CURLcode parse_proxy(struct Curl_easy *data,
static CURLcode parse_proxy_auth(struct Curl_easy *data,
struct connectdata *conn)
{
char *proxyuser = data->set.str[STRING_PROXYUSERNAME];
char *proxypasswd = data->set.str[STRING_PROXYPASSWORD];
const char *proxyuser = data->set.str[STRING_PROXYUSERNAME] ?
data->set.str[STRING_PROXYUSERNAME] : "";
const char *proxypasswd = data->set.str[STRING_PROXYPASSWORD] ?
data->set.str[STRING_PROXYPASSWORD] : "";
CURLcode result = CURLE_OK;

if(proxyuser)
Expand Down

0 comments on commit 3532262

Please sign in to comment.