aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls/polarssl.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-12-13 09:23:36 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-12-13 09:24:51 +0100
commit4bcc532de5b639ace6f96f0a30524a08861843b1 (patch)
tree8d808958c1a58f54b1d29ca68dbe9baaef752d57 /lib/vtls/polarssl.c
parent7f683b0ea87ed158eb4bd22cdd1f26eb901a97d0 (diff)
http: add libcurl option to allow HTTP/2 for HTTPS only
... and stick to 1.1 for HTTP. This is in line with what browsers do and should have very little risk.
Diffstat (limited to 'lib/vtls/polarssl.c')
-rw-r--r--lib/vtls/polarssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index cf7c344a5..e7bcf2f9b 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -359,7 +359,7 @@ polarssl_connect_step1(struct connectdata *conn,
int cur = 0;
#ifdef USE_NGHTTP2
- if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
protocols[cur++] = NGHTTP2_PROTO_VERSION_ID;
infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
}
@@ -463,7 +463,7 @@ polarssl_connect_step2(struct connectdata *conn,
#ifdef USE_NGHTTP2
if(!strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID,
NGHTTP2_PROTO_VERSION_ID_LEN)) {
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
}
else
#endif