nghttpd, nghttpx: Don't log error NGHTTP2_ERR_BAD_PREFACE

This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-02 00:20:44 +09:00
parent e2bbc94616
commit 9f5f724147
2 changed files with 12 additions and 6 deletions

View File

@ -418,8 +418,10 @@ int Http2Handler::read_clear() {
} }
rv = nghttp2_session_mem_recv(session_, buf, nread); rv = nghttp2_session_mem_recv(session_, buf, nread);
if (rv < 0) { if (rv < 0) {
std::cerr << "nghttp2_session_mem_recv() returned error: " if (rv != NGHTTP2_ERR_BAD_PREFACE) {
<< nghttp2_strerror(rv) << std::endl; std::cerr << "nghttp2_session_mem_recv() returned error: "
<< nghttp2_strerror(rv) << std::endl;
}
return -1; return -1;
} }
} }
@ -540,8 +542,10 @@ int Http2Handler::read_tls() {
auto nread = rv; auto nread = rv;
rv = nghttp2_session_mem_recv(session_, buf, nread); rv = nghttp2_session_mem_recv(session_, buf, nread);
if (rv < 0) { if (rv < 0) {
std::cerr << "nghttp2_session_mem_recv() returned error: " if (rv != NGHTTP2_ERR_BAD_PREFACE) {
<< nghttp2_strerror(rv) << std::endl; std::cerr << "nghttp2_session_mem_recv() returned error: "
<< nghttp2_strerror(rv) << std::endl;
}
return -1; return -1;
} }
} }

View File

@ -780,8 +780,10 @@ int Http2Upstream::on_read() {
if (rb->rleft()) { if (rb->rleft()) {
rv = nghttp2_session_mem_recv(session_, rb->pos, rb->rleft()); rv = nghttp2_session_mem_recv(session_, rb->pos, rb->rleft());
if (rv < 0) { if (rv < 0) {
ULOG(ERROR, this) << "nghttp2_session_recv() returned error: " if (rv != NGHTTP2_ERR_BAD_PREFACE) {
<< nghttp2_strerror(rv); ULOG(ERROR, this) << "nghttp2_session_recv() returned error: "
<< nghttp2_strerror(rv);
}
return -1; return -1;
} }