nghttpd: Emit protocol id error only when verbose output is enabled

This commit is contained in:
Tatsuhiro Tsujikawa 2014-03-03 23:51:46 +09:00
parent b5341ebac6
commit f3183efe04
1 changed files with 5 additions and 3 deletions

View File

@ -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;
}