mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-28 01:19:19 -05:00
DoH: reject non-h2 early
Previously, non-h2 connections would be accepted, and then error out with a verbose message "http2: session_recv from ____ failed, error: Received bad client magic byte string". Instead, we can detect absence of h2 support at connection time and reject with a clearer verbose message.
This commit is contained in:
parent
22dc376392
commit
87644fa46b
1 changed files with 3 additions and 0 deletions
|
|
@ -1748,6 +1748,9 @@ ssl_handshake(struct comm_point* c)
|
|||
/* connection upgraded to HTTP2 */
|
||||
c->tcp_do_toggle_rw = 0;
|
||||
c->use_h2 = 1;
|
||||
} else {
|
||||
verbose(VERB_ALGO, "client doesn't support HTTP/2");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue