]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: use `handleImmediateResponse` for custom responses
authorEnsar Sarajčić <dev@ensarsarajcic.com>
Thu, 26 Mar 2026 11:50:52 +0000 (12:50 +0100)
committerEnsar Sarajčić <dev@ensarsarajcic.com>
Thu, 26 Mar 2026 11:50:52 +0000 (12:50 +0100)
Signed-off-by: Ensar Sarajčić <dev@ensarsarajcic.com>
pdns/dnsdistdist/doh3.cc

index e1dcbf4cbbc301763e2b94ff07797b9ce155658b..5f46661a47c465973af4d8eb8f9ce434a7dce0f1 100644 (file)
@@ -536,9 +536,7 @@ static void processDOH3Query(DOH3UnitUniquePtr&& doh3Unit)
             unit->headers = *customHeaders;
           }
 
-          auto conn = getConnection(unit->dsc->df->d_server_config->d_connections, unit->serverConnID);
-          handleResponse(*unit->dsc->df, *conn, unit->streamID, unit->status_code, unit->response, unit->d_contentTypeOut);
-          unit->ids.doh3u.reset();
+          handleImmediateResponse(std::move(unit), "DoH3 custom response");
           return;
         }
       }