diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-10-20 20:32:08 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-10-20 20:32:08 +0000 |
commit | b83c7ade10d9c1ded861f29953dc9ab384f45e89 (patch) | |
tree | 187736c3e7ae46b2ea5f758e9ea3912357083cf4 /lib | |
parent | 7d6584e1407ad3c4a067515faf431c15e698103b (diff) |
allow no user and password for proxy too, Basic
Diffstat (limited to 'lib')
-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); |