diff options
author | Brad King <brad.king@kitware.com> | 2018-01-24 19:17:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-24 19:18:16 (GMT) |
commit | cd8e31a1bf7429514078c2923a1a9580113f9d4f (patch) | |
tree | 6a0b8a01e3e0e52bb4b3abb66ce9e992614af6a7 /Utilities/cmcurl/lib/http_proxy.c | |
parent | e9c8ea75575afdb4e87b262641ee4071ef42b4c6 (diff) | |
parent | af9e654045f11028e50dac4781e297834129a749 (diff) | |
download | CMake-cd8e31a1bf7429514078c2923a1a9580113f9d4f.zip CMake-cd8e31a1bf7429514078c2923a1a9580113f9d4f.tar.gz CMake-cd8e31a1bf7429514078c2923a1a9580113f9d4f.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2018-01-23 (d6c21c8e)
Diffstat (limited to 'Utilities/cmcurl/lib/http_proxy.c')
-rw-r--r-- | Utilities/cmcurl/lib/http_proxy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Utilities/cmcurl/lib/http_proxy.c b/Utilities/cmcurl/lib/http_proxy.c index dff9d23..7f50405 100644 --- a/Utilities/cmcurl/lib/http_proxy.c +++ b/Utilities/cmcurl/lib/http_proxy.c @@ -167,6 +167,7 @@ static CURLcode connect_init(struct connectdata *conn, bool reinit) s->line_start = s->connect_buffer; s->ptr = s->line_start; s->cl = 0; + s->close_connection = FALSE; return CURLE_OK; } @@ -187,8 +188,7 @@ static CURLcode CONNECT(struct connectdata *conn, struct SingleRequest *k = &data->req; CURLcode result; curl_socket_t tunnelsocket = conn->sock[sockindex]; - bool closeConnection = FALSE; - time_t check; + timediff_t check; struct http_connect_state *s = conn->connect_state; #define SELECT_OK 0 @@ -529,7 +529,7 @@ static CURLcode CONNECT(struct connectdata *conn, } } else if(Curl_compareheader(s->line_start, "Connection:", "close")) - closeConnection = TRUE; + s->close_connection = TRUE; else if(checkprefix("Transfer-Encoding:", s->line_start)) { if(k->httpcode/100 == 2) { /* A client MUST ignore any Content-Length or Transfer-Encoding @@ -548,7 +548,7 @@ static CURLcode CONNECT(struct connectdata *conn, } else if(Curl_compareheader(s->line_start, "Proxy-Connection:", "close")) - closeConnection = TRUE; + s->close_connection = TRUE; else if(2 == sscanf(s->line_start, "HTTP/1.%d %d", &subversion, &k->httpcode)) { @@ -578,10 +578,10 @@ static CURLcode CONNECT(struct connectdata *conn, /* the connection has been marked for closure, most likely in the Curl_http_auth_act() function and thus we can kill it at once below */ - closeConnection = TRUE; + s->close_connection = TRUE; } - if(closeConnection && data->req.newurl) { + if(s->close_connection && data->req.newurl) { /* Connection closed by server. Don't use it anymore */ Curl_closesocket(conn, conn->sock[sockindex]); conn->sock[sockindex] = CURL_SOCKET_BAD; @@ -599,7 +599,7 @@ static CURLcode CONNECT(struct connectdata *conn, } while(data->req.newurl); if(data->info.httpproxycode/100 != 2) { - if(closeConnection && data->req.newurl) { + if(s->close_connection && data->req.newurl) { conn->bits.proxy_connect_closed = TRUE; infof(data, "Connect me again please\n"); connect_done(conn); |