diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2020-06-30 13:30:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-01 14:09:50 (GMT) |
commit | 4446fda8e019a0138bec1aa2d83a720d63019ff9 (patch) | |
tree | 470d68139edf0b965ead4ecaf805a222e34e98f9 /lib/http.c | |
parent | 5717fdc114a704cddae629e20e6588191360e98a (diff) | |
download | CMake-4446fda8e019a0138bec1aa2d83a720d63019ff9.zip CMake-4446fda8e019a0138bec1aa2d83a720d63019ff9.tar.gz CMake-4446fda8e019a0138bec1aa2d83a720d63019ff9.tar.bz2 |
curl 2020-06-30 (5a1fc8d3)
Code extracted from:
https://github.com/curl/curl.git
at commit 5a1fc8d33808d7b22f57bdf9403cda7ff07b0670 (curl-7_71_1).
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -125,7 +125,8 @@ const struct Curl_handler Curl_handler_http = { ZERO_NULL, /* connection_check */ PORT_HTTP, /* defport */ CURLPROTO_HTTP, /* protocol */ - PROTOPT_CREDSPERREQUEST /* flags */ + PROTOPT_CREDSPERREQUEST | /* flags */ + PROTOPT_USERPWDCTRL }; #ifdef USE_SSL @@ -150,7 +151,8 @@ const struct Curl_handler Curl_handler_https = { ZERO_NULL, /* connection_check */ PORT_HTTPS, /* defport */ CURLPROTO_HTTPS, /* protocol */ - PROTOPT_SSL | PROTOPT_CREDSPERREQUEST | PROTOPT_ALPN_NPN /* flags */ + PROTOPT_SSL | PROTOPT_CREDSPERREQUEST | PROTOPT_ALPN_NPN | /* flags */ + PROTOPT_USERPWDCTRL }; #endif @@ -268,7 +270,7 @@ char *Curl_copy_header_value(const char *header) return NULL; memcpy(value, start, len); - value[len] = 0; /* zero terminate */ + value[len] = 0; /* null-terminate */ return value; } @@ -306,7 +308,7 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) pwd = conn->passwd; } - out = aprintf("%s:%s", user, pwd); + out = aprintf("%s:%s", user, pwd ? pwd : ""); if(!out) return CURLE_OUT_OF_MEMORY; |