From d469db4fece0afb62ba58359d265a56712d5db64 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 20 Oct 2025 22:01:29 +0200 Subject: http: Do not include query in path No handler currently care about query, so they should be ignored. --- src/http.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/http.cc b/src/http.cc index c88aa6d..4204dcb 100644 --- a/src/http.cc +++ b/src/http.cc @@ -752,6 +752,9 @@ class ServerImpl : public Server { close_client(client_id); return false; } + size_t query = path.find('?'); + if (query != std::string_view::npos) + path = path.substr(0, query); } for (size_t i = 1; i < lines.size(); ++i) { auto colon = lines[i].find(':'); -- cgit v1.2.3-70-g09d2