From f3183efe043d4baf505a13bbae3ff038d8e25bf8 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 3 Mar 2014 23:51:46 +0900 Subject: [PATCH] nghttpd: Emit protocol id error only when verbose output is enabled --- src/HttpServer.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/HttpServer.cc b/src/HttpServer.cc index b5a9dc73..a4e08bb8 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -450,9 +450,11 @@ int Http2Handler::verify_npn_result() #endif // OPENSSL_VERSION_NUMBER < 0x10002000L } } - std::cerr << "Client did not advertise HTTP/2.0 protocol." - << " (nghttp2 expects " << NGHTTP2_PROTO_VERSION_ID << ")" - << std::endl; + if(sessions_->get_config()->verbose) { + std::cerr << "Client did not advertise HTTP/2.0 protocol." + << " (nghttp2 expects " << NGHTTP2_PROTO_VERSION_ID << ")" + << std::endl; + } return -1; }