1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-01 01:41:50 -05:00

allow no user and password for proxy too, Basic

This commit is contained in:
Daniel Stenberg 2003-10-20 20:32:08 +00:00
parent 7d6584e140
commit b83c7ade10

View File

@ -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);