Loading lib/http.c +2 −2 Original line number Diff line number Diff line Loading @@ -1795,7 +1795,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(conn->httpversion < 20) { /* unless the connection is re-used and already http2 */ switch(conn->negnpn) { case NPN_HTTP2: case CURL_HTTP_VERSION_2_0: result = Curl_http2_init(conn); if(result) return result; Loading @@ -1808,7 +1808,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; break; case NPN_HTTP1_1: case CURL_HTTP_VERSION_1_1: /* continue with HTTP/1.1 when explicitly requested */ break; default: Loading lib/urldata.h +1 −7 Original line number Diff line number Diff line Loading @@ -600,12 +600,6 @@ enum upgrade101 { UPGR101_WORKING /* talking upgraded protocol */ }; enum negotiatenpn { NPN_INIT, /* default state */ NPN_HTTP1_1, /* HTTP/1.1 negotiated */ NPN_HTTP2 /* HTTP2 (draft-xx) negotiated */ }; /* * Request specific data in the easy handle (SessionHandle). Previously, * these members were on the connectdata struct but since a conn struct may Loading Loading @@ -1067,7 +1061,7 @@ struct connectdata { } tunnel_state[2]; /* two separate ones to allow FTP */ struct connectbundle *bundle; /* The bundle we are member of */ enum negotiatenpn negnpn; int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */ }; /* The end of connectdata. */ Loading lib/vtls/gtls.c +2 −2 Original line number Diff line number Diff line Loading @@ -1073,13 +1073,13 @@ gtls_connect_step3(struct connectdata *conn, if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data, NGHTTP2_PROTO_VERSION_ID_LEN)) { conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; } else #endif if(proto.size == ALPN_HTTP_1_1_LENGTH && !memcmp(ALPN_HTTP_1_1, proto.data, ALPN_HTTP_1_1_LENGTH)) { conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; } } else Loading lib/vtls/nss.c +2 −2 Original line number Diff line number Diff line Loading @@ -717,13 +717,13 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg) #ifdef USE_NGHTTP2 if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)) { conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; } else #endif if(buflen == ALPN_HTTP_1_1_LENGTH && !memcmp(ALPN_HTTP_1_1, buf, ALPN_HTTP_1_1_LENGTH)) { conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; } } } Loading lib/vtls/openssl.c +5 −5 Original line number Diff line number Diff line Loading @@ -1645,7 +1645,7 @@ select_next_proto_cb(SSL *ssl, NGHTTP2_PROTO_VERSION_ID_LEN)) { infof(conn->data, "NPN, negotiated HTTP2 (%s)\n", NGHTTP2_PROTO_VERSION_ID); conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; return SSL_TLSEXT_ERR_OK; } #endif Loading @@ -1653,14 +1653,14 @@ select_next_proto_cb(SSL *ssl, if(!select_next_protocol(out, outlen, in, inlen, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) { infof(conn->data, "NPN, negotiated HTTP1.1\n"); conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; return SSL_TLSEXT_ERR_OK; } infof(conn->data, "NPN, no overlap, use HTTP1.1\n"); *out = (unsigned char *)ALPN_HTTP_1_1; *outlen = ALPN_HTTP_1_1_LENGTH; conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; return SSL_TLSEXT_ERR_OK; } Loading Loading @@ -2225,13 +2225,13 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) #ifdef USE_NGHTTP2 if(len == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len)) { conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; } else #endif if(len == ALPN_HTTP_1_1_LENGTH && !memcmp(ALPN_HTTP_1_1, neg_protocol, ALPN_HTTP_1_1_LENGTH)) { conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; } } else Loading Loading
lib/http.c +2 −2 Original line number Diff line number Diff line Loading @@ -1795,7 +1795,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(conn->httpversion < 20) { /* unless the connection is re-used and already http2 */ switch(conn->negnpn) { case NPN_HTTP2: case CURL_HTTP_VERSION_2_0: result = Curl_http2_init(conn); if(result) return result; Loading @@ -1808,7 +1808,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; break; case NPN_HTTP1_1: case CURL_HTTP_VERSION_1_1: /* continue with HTTP/1.1 when explicitly requested */ break; default: Loading
lib/urldata.h +1 −7 Original line number Diff line number Diff line Loading @@ -600,12 +600,6 @@ enum upgrade101 { UPGR101_WORKING /* talking upgraded protocol */ }; enum negotiatenpn { NPN_INIT, /* default state */ NPN_HTTP1_1, /* HTTP/1.1 negotiated */ NPN_HTTP2 /* HTTP2 (draft-xx) negotiated */ }; /* * Request specific data in the easy handle (SessionHandle). Previously, * these members were on the connectdata struct but since a conn struct may Loading Loading @@ -1067,7 +1061,7 @@ struct connectdata { } tunnel_state[2]; /* two separate ones to allow FTP */ struct connectbundle *bundle; /* The bundle we are member of */ enum negotiatenpn negnpn; int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */ }; /* The end of connectdata. */ Loading
lib/vtls/gtls.c +2 −2 Original line number Diff line number Diff line Loading @@ -1073,13 +1073,13 @@ gtls_connect_step3(struct connectdata *conn, if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data, NGHTTP2_PROTO_VERSION_ID_LEN)) { conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; } else #endif if(proto.size == ALPN_HTTP_1_1_LENGTH && !memcmp(ALPN_HTTP_1_1, proto.data, ALPN_HTTP_1_1_LENGTH)) { conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; } } else Loading
lib/vtls/nss.c +2 −2 Original line number Diff line number Diff line Loading @@ -717,13 +717,13 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg) #ifdef USE_NGHTTP2 if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)) { conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; } else #endif if(buflen == ALPN_HTTP_1_1_LENGTH && !memcmp(ALPN_HTTP_1_1, buf, ALPN_HTTP_1_1_LENGTH)) { conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; } } } Loading
lib/vtls/openssl.c +5 −5 Original line number Diff line number Diff line Loading @@ -1645,7 +1645,7 @@ select_next_proto_cb(SSL *ssl, NGHTTP2_PROTO_VERSION_ID_LEN)) { infof(conn->data, "NPN, negotiated HTTP2 (%s)\n", NGHTTP2_PROTO_VERSION_ID); conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; return SSL_TLSEXT_ERR_OK; } #endif Loading @@ -1653,14 +1653,14 @@ select_next_proto_cb(SSL *ssl, if(!select_next_protocol(out, outlen, in, inlen, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) { infof(conn->data, "NPN, negotiated HTTP1.1\n"); conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; return SSL_TLSEXT_ERR_OK; } infof(conn->data, "NPN, no overlap, use HTTP1.1\n"); *out = (unsigned char *)ALPN_HTTP_1_1; *outlen = ALPN_HTTP_1_1_LENGTH; conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; return SSL_TLSEXT_ERR_OK; } Loading Loading @@ -2225,13 +2225,13 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) #ifdef USE_NGHTTP2 if(len == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len)) { conn->negnpn = NPN_HTTP2; conn->negnpn = CURL_HTTP_VERSION_2_0; } else #endif if(len == ALPN_HTTP_1_1_LENGTH && !memcmp(ALPN_HTTP_1_1, neg_protocol, ALPN_HTTP_1_1_LENGTH)) { conn->negnpn = NPN_HTTP1_1; conn->negnpn = CURL_HTTP_VERSION_1_1; } } else Loading