shrpx: make nghttpx -v show ngtcp2 and nghttp3 version as well

... if HTTP/3 support is built in.
This commit is contained in:
Daniel Stenberg 2021-11-04 15:42:51 +01:00 committed by Tatsuhiro Tsujikawa
parent c4828dbd7c
commit 9e154297ff
1 changed files with 10 additions and 1 deletions

View File

@ -76,6 +76,11 @@
#include <nghttp2/nghttp2.h> #include <nghttp2/nghttp2.h>
#ifdef ENABLE_HTTP3
# include <ngtcp2/ngtcp2.h>
# include <nghttp3/nghttp3.h>
#endif // ENABLE_HTTP3
#include "shrpx_config.h" #include "shrpx_config.h"
#include "shrpx_tls.h" #include "shrpx_tls.h"
#include "shrpx_log_config.h" #include "shrpx_log_config.h"
@ -2053,7 +2058,11 @@ void fill_default_config(Config *config) {
namespace { namespace {
void print_version(std::ostream &out) { void print_version(std::ostream &out) {
out << "nghttpx nghttp2/" NGHTTP2_VERSION << std::endl; out << "nghttpx nghttp2/" NGHTTP2_VERSION
#ifdef ENABLE_HTTP3
" ngtcp2/" NGTCP2_VERSION " nghttp3/" NGHTTP3_VERSION
#endif // ENABLE_HTTP3
<< std::endl;
} }
} // namespace } // namespace