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:
parent
7d6584e140
commit
b83c7ade10
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user