]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
webserver: create a UUID per request
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 21 Jan 2019 16:57:43 +0000 (17:57 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 21 Jan 2019 16:57:43 +0000 (17:57 +0100)
configure.ac
pdns/Makefile.am
pdns/webserver.cc

index 259604bbd1181c61df986a7c8ef519de4dc12aa5..daafed23106e68e051ae8d7bb3b6dc9eabd0bcd2 100644 (file)
@@ -106,7 +106,7 @@ PDNS_CHECK_LIBCRYPTO_EDDSA
 PDNS_CHECK_RAGEL([pdns/dnslabeltext.cc], [www.powerdns.com])
 PDNS_CHECK_CLOCK_GETTIME
 
-BOOST_REQUIRE([1.35])
+BOOST_REQUIRE([1.42])
 # Boost accumulators, as used by dnsbulktest and dnstcpbench, need 1.48+
 # to be compatible with C++11
 AM_CONDITIONAL([HAVE_BOOST_GE_148], [test "$boost_major_version" -ge 148])
index 36f1877c97567c53eb9ad05013249e3f98e0dc3b..099c84868c8cc7397823977c071727c868e08f80 100644 (file)
@@ -223,6 +223,7 @@ pdns_server_SOURCES = \
        tsigutils.hh tsigutils.cc \
        tkey.cc \
        ueberbackend.cc ueberbackend.hh \
+       uuid-utils.hh uuid-utils.cc \
        unix_semaphore.cc \
        unix_utility.cc \
        utility.hh \
@@ -639,6 +640,7 @@ ixfrdist_SOURCES = \
        statbag.cc \
        threadname.hh threadname.cc \
        tsigverifier.cc tsigverifier.hh \
+       uuid-utils.hh uuid-utils.cc \
        unix_utility.cc \
        webserver.hh webserver.cc \
        zoneparser-tng.cc
index e7a3521eea66b21393870cd9d453e0eca3d095d3..740922a078f2050c27ec8072baa86f1fb4c725c9 100644 (file)
@@ -33,6 +33,7 @@
 #include "dns.hh"
 #include "base64.hh"
 #include "json.hh"
+#include "uuid-utils.hh"
 #include <yahttp/router.hpp>
 
 json11::Json HttpRequest::json()
@@ -278,7 +279,7 @@ void WebServer::handleRequest(HttpRequest& req, HttpResponse& resp) const
 }
 
 void WebServer::serveConnection(std::shared_ptr<Socket> client) const {
-  const string logprefix = d_logprefix + "<" + "I should be a UUID" + "> ";
+  const string logprefix = d_logprefix + "<" + to_string(getUniqueID()) + "> ";
 
   HttpRequest req(logprefix);
   HttpResponse resp;