]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove dead code. 16954/head
authorMiod Vallat <miod.vallat@powerdns.com>
Fri, 6 Mar 2026 09:42:08 +0000 (10:42 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Fri, 6 Mar 2026 09:42:08 +0000 (10:42 +0100)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/webserver.cc
pdns/webserver.hh

index 597bb91cad4cde54c6de288699c5f79cd12da1ef..ea1721839fa827469df19ca317bb6028678565e2 100644 (file)
@@ -82,17 +82,6 @@ bool HttpRequest::compareAuthorization(const CredentialsHolder& credentials) con
   return auth_ok;
 }
 
-bool HttpRequest::compareHeader(const string &header_name, const string &expected_value) const
-{
-  auto header = headers.find(header_name);
-  if (header == headers.end()) {
-    return false;
-  }
-
-  // this gets rid of terminating zeros
-  return (0==strcmp(header->second.c_str(), expected_value.c_str()));
-}
-
 bool HttpRequest::compareHeader(const string &header_name, const CredentialsHolder& credentials) const
 {
   auto header = headers.find(header_name);
index fe0283743e2618f25cc389cae72d1a86a4d11a3a..c3180b2f4b1c57db26bbac070deb9967a6aa73d1 100644 (file)
@@ -61,7 +61,6 @@ public:
   // checks password _only_.
   bool compareAuthorization(const CredentialsHolder& expectedCredentials) const;
   bool compareHeader(const string &header_name, const CredentialsHolder& expectedCredentials) const;
-  bool compareHeader(const string &header_name, const string &expected_value) const;
 
 #ifdef RECURSOR
   void setSLog(Logr::log_t log)