diff options
-rw-r--r-- | lib/http.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index 95e06ecf8..bb09be10d 100644 --- a/lib/http.c +++ b/lib/http.c @@ -146,7 +146,9 @@ static CURLcode Curl_output_basic_proxy(struct connectdata *conn) char *authorization; struct SessionHandle *data=conn->data; - sprintf(data->state.buffer, "%s:%s", conn->proxyuser, conn->proxypasswd); + sprintf(data->state.buffer, "%s:%s", + conn->proxyuser?conn->proxyuser:"", + conn->proxypasswd?conn->proxypasswd:""); if(Curl_base64_encode(data->state.buffer, strlen(data->state.buffer), &authorization) >= 0) { Curl_safefree(conn->allocptr.proxyuserpwd); |