mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
HTTPS-Proxy: don't offer h2 for https proxy connections
Bug: https://github.com/curl/curl/issues/1254 Closes #1546
This commit is contained in:
parent
f94fcdba6e
commit
17c5d05285
@ -763,7 +763,8 @@ gtls_connect_step1(struct connectdata *conn,
|
||||
gnutls_datum_t protocols[2];
|
||||
|
||||
#ifdef USE_NGHTTP2
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2 &&
|
||||
(!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) {
|
||||
protocols[cur].data = (unsigned char *)NGHTTP2_PROTO_VERSION_ID;
|
||||
protocols[cur].size = NGHTTP2_PROTO_VERSION_ID_LEN;
|
||||
cur++;
|
||||
|
@ -1992,7 +1992,8 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
|
||||
unsigned char protocols[128];
|
||||
|
||||
#ifdef USE_NGHTTP2
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2 &&
|
||||
(!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) {
|
||||
protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
|
||||
memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
|
||||
NGHTTP2_PROTO_VERSION_ID_LEN);
|
||||
|
@ -2057,7 +2057,8 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
|
||||
unsigned char protocols[128];
|
||||
|
||||
#ifdef USE_NGHTTP2
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2 &&
|
||||
(!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) {
|
||||
protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
|
||||
|
||||
memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
|
||||
|
Loading…
Reference in New Issue
Block a user