aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/monitoring/httpstats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp/monitoring/httpstats.cpp')
-rw-r--r--src/zenhttp/monitoring/httpstats.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenhttp/monitoring/httpstats.cpp b/src/zenhttp/monitoring/httpstats.cpp
index 1dad48d68..43260a202 100644
--- a/src/zenhttp/monitoring/httpstats.cpp
+++ b/src/zenhttp/monitoring/httpstats.cpp
@@ -70,6 +70,11 @@ HttpStatsService::HandleRequest(HttpServerRequest& Request)
if (Key[0] == '/')
{
Key.remove_prefix(1);
+ size_t SlashPos = Key.find_first_of("/?");
+ if (SlashPos != std::string::npos)
+ {
+ Key = Key.substr(0, SlashPos);
+ }
RwLock::SharedLockScope _(m_Lock);
if (auto It = m_Providers.find(std::string{Key}); It != end(m_Providers))