diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-07-18 10:43:16 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-07-20 00:06:42 +0200 |
commit | 828392ae10e6e7855e66a78c01346f9cd1127467 (patch) | |
tree | 76d591f49c38d2521db621ea30ac18eb5b85a94a /lib/version.c | |
parent | 0cbdf4513d1cef5784efbada758fc5bb7ee77be0 (diff) | |
download | curl-828392ae10e6e7855e66a78c01346f9cd1127467.tar.gz |
curl_version_info: provide nghttp2 details
Introducing CURLVERSION_SIXTH with nghttp2 info.
Closes #4121
Diffstat (limited to 'lib/version.c')
-rw-r--r-- | lib/version.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/version.c b/lib/version.c index 14b0531d3..941313dfb 100644 --- a/lib/version.c +++ b/lib/version.c @@ -385,6 +385,8 @@ static curl_version_info_data version_info = { NULL, /* ssh lib version */ 0, /* brotli_ver_num */ NULL, /* brotli version */ + 0, /* nghttp2 version number */ + NULL /* nghttp2 version string */ }; curl_version_info_data *curl_version_info(CURLversion stamp) @@ -460,6 +462,14 @@ curl_version_info_data *curl_version_info(CURLversion stamp) version_info.brotli_version = brotli_buffer; #endif +#ifdef USE_NGHTTP2 + { + nghttp2_info *h2 = nghttp2_version(0); + version_info.nghttp2_ver_num = h2->version_num; + version_info.nghttp2_version = h2->version_str; + } +#endif + (void)stamp; /* avoid compiler warnings, we don't use this */ initialized = true; |