From f2c44f9a841cd981cd93dc9cf69bfaa114358866 Mon Sep 17 00:00:00 2001 From: Jeff Raymakers Date: Thu, 20 Feb 2025 14:17:45 -0800 Subject: [PATCH] add ddb version to user agent --- src/http_server.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/http_server.cpp b/src/http_server.cpp index d9507af..b333eb9 100644 --- a/src/http_server.cpp +++ b/src/http_server.cpp @@ -1,13 +1,13 @@ #include "http_server.hpp" -#include -#include -#include -#include +#include "state.hpp" +#include "utils/encoding.hpp" #include "utils/env.hpp" #include "utils/serialization.hpp" -#include "utils/encoding.hpp" -#include "state.hpp" +#include +#include +#include +#include // Chosen to be no more than half of the lesser of the two limits: // - The default httplib thread pool size = 8 @@ -124,8 +124,9 @@ const HttpServer &HttpServer::Start(const uint16_t _local_port, #ifndef UI_EXTENSION_GIT_SHA #error "UI_EXTENSION_GIT_SHA must be defined" #endif - user_agent = StringUtil::Format("duckdb-ui/%s(%s)", UI_EXTENSION_GIT_SHA, - DuckDB::Platform()); + user_agent = + StringUtil::Format("duckdb-ui/%s-%s(%s)", DuckDB::LibraryVersion(), + UI_EXTENSION_GIT_SHA, DuckDB::Platform()); event_dispatcher = make_uniq(); main_thread = make_uniq(&HttpServer::Run, this); StartWatcher();