mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 01:59:59 -04:00
DoH: reduce excessive bad request logging
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.
(cherry picked from commit 937b5f8349)
This commit is contained in:
parent
c53541bfc5
commit
50a062e5ce
1 changed files with 6 additions and 0 deletions
|
|
@ -2484,6 +2484,12 @@ isc__nm_http_bad_request(isc_nmhandle_t *handle) {
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue