From: Remi Gacogne Date: Tue, 21 Apr 2026 07:30:54 +0000 (+0200) Subject: dnsdist: Be more consistent when processing DoH3 headers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78cc882e6ddbb548745f7713cc461a3b62b5e207;p=thirdparty%2Fpdns.git dnsdist: Be more consistent when processing DoH3 headers Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/doh3.cc b/pdns/dnsdistdist/doh3.cc index e0b1c78099..d24249955f 100644 --- a/pdns/dnsdistdist/doh3.cc +++ b/pdns/dnsdistdist/doh3.cc @@ -868,7 +868,8 @@ static void processH3DataEvent(ClientState& clientState, DOH3Frontend& frontend, return; } } - if (headers.count("content-type") == 0 || headers.at("content-type") != "application/dns-message") { + auto contentTypeHeaderIt = headers.find("content-type"); + if (contentTypeHeaderIt == headers.end() || contentTypeHeaderIt->second != "application/dns-message") { handleImmediateError("Unsupported content-type"); return; }