projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac48784
)
Curl_setopt: refuse CURL_HTTP_VERSION_2_0 if built without support
author
Daniel Stenberg
<daniel@haxx.se>
Tue, 3 Sep 2013 21:32:08 +0000
(23:32 +0200)
committer
Daniel Stenberg
<daniel@haxx.se>
Wed, 4 Sep 2013 20:29:38 +0000
(22:29 +0200)
lib/url.c
patch
|
blob
|
history
diff --git
a/lib/url.c
b/lib/url.c
index 0ec0a96b921ac89dc5b8e527eefbbce88302d3d7..f6da3ca268bb6daa6d8905829d578ddc17a22388 100644
(file)
--- a/
lib/url.c
+++ b/
lib/url.c
@@
-1203,7
+1203,12
@@
CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* This sets a requested HTTP version to be used. The value is one of
* the listed enums in curl/curl.h.
*/
- data->set.httpversion = va_arg(param, long);
+ arg = va_arg(param, long);
+#ifndef USE_NGHTTP2
+ if(arg == CURL_HTTP_VERSION_2_0)
+ return CURLE_UNSUPPORTED_PROTOCOL;
+#endif
+ data->set.httpversion = arg;
break;
case CURLOPT_HTTPAUTH: