aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-20 20:32:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-20 20:32:08 +0000
commitb83c7ade10d9c1ded861f29953dc9ab384f45e89 (patch)
tree187736c3e7ae46b2ea5f758e9ea3912357083cf4
parent7d6584e1407ad3c4a067515faf431c15e698103b (diff)
allow no user and password for proxy too, Basic
-rw-r--r--lib/http.c4
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);