aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2019-12-04 01:10:17 -0500
committerJay Satiro <raysatiro@yahoo.com>2019-12-05 18:38:40 -0500
commit0edf75865a8ab3783cb42acded8288108bbe3b5b (patch)
tree41803fa7d39342f2c230b94716dd56be58d14228
parent9ea769e15f60f8bebf42bffd708658296a812d6e (diff)
setopt: Fix ALPN / NPN user option when built without HTTP2
- Stop treating lack of HTTP2 as an unknown option error result for CURLOPT_SSL_ENABLE_ALPN and CURLOPT_SSL_ENABLE_NPN. Prior to this change it was impossible to disable ALPN / NPN if libcurl was built without HTTP2. Setting either option would result in CURLE_UNKNOWN_OPTION and the respective internal option would not be set. That was incorrect since ALPN and NPN are used independent of HTTP2. Reported-by: Shailesh Kapse Fixes https://github.com/curl/curl/issues/4668 Closes https://github.com/curl/curl/pull/4672
-rw-r--r--lib/setopt.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index d7b9ca285..57e1090ce 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -2613,14 +2613,12 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
result = CURLE_NOT_BUILT_IN;
#endif
break;
-#ifdef USE_NGHTTP2
case CURLOPT_SSL_ENABLE_NPN:
data->set.ssl_enable_npn = (0 != va_arg(param, long)) ? TRUE : FALSE;
break;
case CURLOPT_SSL_ENABLE_ALPN:
data->set.ssl_enable_alpn = (0 != va_arg(param, long)) ? TRUE : FALSE;
break;
-#endif
#ifdef USE_UNIX_SOCKETS
case CURLOPT_UNIX_SOCKET_PATH:
data->set.abstract_unix_socket = FALSE;