summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/http_proxy.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-04 19:34:39 (GMT)
committerBrad King <brad.king@kitware.com>2020-03-04 19:34:39 (GMT)
commitd61c3bd50520ce0179f52a129d5c660aebad88ba (patch)
tree4476c31b8b03de36811d94b5d9282318e84784b2 /Utilities/cmcurl/lib/http_proxy.c
parent84dc14a967b78431c95ed3203e5dd301b6897267 (diff)
parent735ea3001ae98636a4cb7caf15a40960c0da39a1 (diff)
downloadCMake-d61c3bd50520ce0179f52a129d5c660aebad88ba.zip
CMake-d61c3bd50520ce0179f52a129d5c660aebad88ba.tar.gz
CMake-d61c3bd50520ce0179f52a129d5c660aebad88ba.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2020-03-04 (b8d13668)
Diffstat (limited to 'Utilities/cmcurl/lib/http_proxy.c')
-rw-r--r--Utilities/cmcurl/lib/http_proxy.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/Utilities/cmcurl/lib/http_proxy.c b/Utilities/cmcurl/lib/http_proxy.c
index d7ed117..75c7a60 100644
--- a/Utilities/cmcurl/lib/http_proxy.c
+++ b/Utilities/cmcurl/lib/http_proxy.c
@@ -58,8 +58,9 @@ static CURLcode https_proxy_connect(struct connectdata *conn, int sockindex)
Curl_ssl_connect_nonblocking(conn, sockindex,
&conn->bits.proxy_ssl_connected[sockindex]);
if(result)
- conn->bits.close = TRUE; /* a failed connection is marked for closure to
- prevent (bad) re-use or similar */
+ /* a failed connection is marked for closure to prevent (bad) re-use or
+ similar */
+ connclose(conn, "TLS handshake failed");
}
return result;
#else
@@ -327,7 +328,7 @@ static CURLcode CONNECT(struct connectdata *conn,
{ /* READING RESPONSE PHASE */
int error = SELECT_OK;
- while(s->keepon && !error) {
+ while(s->keepon) {
ssize_t gotbytes;
/* make sure we have space to read more data */
@@ -384,11 +385,12 @@ static CURLcode CONNECT(struct connectdata *conn,
/* chunked-encoded body, so we need to do the chunked dance
properly to know when the end of the body is reached */
CHUNKcode r;
+ CURLcode extra;
ssize_t tookcareof = 0;
/* now parse the chunked piece of data so that we can
properly tell when the stream ends */
- r = Curl_httpchunk_read(conn, s->ptr, 1, &tookcareof);
+ r = Curl_httpchunk_read(conn, s->ptr, 1, &tookcareof, &extra);
if(r == CHUNKE_STOP) {
/* we're done reading chunks! */
infof(data, "chunk reading DONE\n");
@@ -455,6 +457,7 @@ static CURLcode CONNECT(struct connectdata *conn,
}
else if(s->chunked_encoding) {
CHUNKcode r;
+ CURLcode extra;
infof(data, "Ignore chunked response-body\n");
@@ -472,7 +475,8 @@ static CURLcode CONNECT(struct connectdata *conn,
/* now parse the chunked piece of data so that we can
properly tell when the stream ends */
- r = Curl_httpchunk_read(conn, s->line_start + 1, 1, &gotbytes);
+ r = Curl_httpchunk_read(conn, s->line_start + 1, 1, &gotbytes,
+ &extra);
if(r == CHUNKE_STOP) {
/* we're done reading chunks! */
infof(data, "chunk reading DONE\n");
@@ -632,6 +636,7 @@ static CURLcode CONNECT(struct connectdata *conn,
conn->allocptr.proxyuserpwd = NULL;
data->state.authproxy.done = TRUE;
+ data->state.authproxy.multipass = FALSE;
infof(data, "Proxy replied %d to CONNECT request\n",
data->info.httpproxycode);