We started using isc_nm_bad_request() more actively throughout
codebase. In the case of HTTP/2 it can lead to a large count of
useless "Bad Request" messages in the BIND log, as often we attempt to
send such request over effectively finished HTTP/2 sessions.
This commit fixes that.
REQUIRE(!sock->client);
REQUIRE(VALID_HTTP2_SESSION(sock->h2->session));
+ if (sock->h2->response_submitted ||
+ !http_session_active(sock->h2->session))
+ {
+ return;
+ }
+
(void)server_send_error_response(ISC_HTTP_ERROR_BAD_REQUEST,
sock->h2->session->ngsession, sock);
}