aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp')
-rw-r--r--src/zenhttp/httpserver.cpp5
-rw-r--r--src/zenhttp/include/zenhttp/httptest.h2
-rw-r--r--src/zenhttp/xmake.lua2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/zenhttp/httpserver.cpp b/src/zenhttp/httpserver.cpp
index 2c063d646..f48c22367 100644
--- a/src/zenhttp/httpserver.cpp
+++ b/src/zenhttp/httpserver.cpp
@@ -86,6 +86,9 @@ MapContentTypeToString(HttpContentType ContentType)
case HttpContentType::kXML:
return "application/xml"sv;
+
+ case HttpContentType::kProtobuf:
+ return "application/x-protobuf"sv;
}
}
@@ -119,6 +122,7 @@ static constinit uint32_t HashImagePng = HashStringDjb2("image/png"sv);
static constinit uint32_t HashIcon = HashStringDjb2("ico"sv);
static constinit uint32_t HashImageIcon = HashStringDjb2("image/x-icon"sv);
static constinit uint32_t HashXml = HashStringDjb2("application/xml"sv);
+static constinit uint32_t HashProtobuf = HashStringDjb2("application/x-protobuf"sv);
std::once_flag InitContentTypeLookup;
@@ -153,6 +157,7 @@ struct HashedTypeEntry
{HashIcon, HttpContentType::kIcon},
{HashImageIcon, HttpContentType::kIcon},
{HashXml, HttpContentType::kXML},
+ {HashProtobuf, HttpContentType::kProtobuf},
// clang-format on
};
diff --git a/src/zenhttp/include/zenhttp/httptest.h b/src/zenhttp/include/zenhttp/httptest.h
index afe71fbce..608462809 100644
--- a/src/zenhttp/include/zenhttp/httptest.h
+++ b/src/zenhttp/include/zenhttp/httptest.h
@@ -3,8 +3,8 @@
#pragma once
#include <zencore/logging.h>
-#include <zencore/stats.h>
#include <zenhttp/httpserver.h>
+#include <zentelemetry/stats.h>
#include <atomic>
#include <unordered_map>
diff --git a/src/zenhttp/xmake.lua b/src/zenhttp/xmake.lua
index b6ffbe467..af4064012 100644
--- a/src/zenhttp/xmake.lua
+++ b/src/zenhttp/xmake.lua
@@ -7,7 +7,7 @@ target('zenhttp')
add_files("**.cpp")
add_files("servers/httpsys.cpp", {unity_ignored=true})
add_includedirs("include", {public=true})
- add_deps("zencore", "transport-sdk")
+ add_deps("zencore", "zentelemetry", "transport-sdk")
add_packages(
"vcpkg::asio",
"vcpkg::cpr",