MCPcopy Create free account
hub / github.com/chrxh/alien / dispatch_request_for_content_reader

Method dispatch_request_for_content_reader

external/cpp-httplib/httplib.h:5712–5725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5710 }
5711
5712 inline bool Server::dispatch_request_for_content_reader(
5713 Request& req, Response& res, ContentReader content_reader,
5714 const HandlersForContentReader& handlers) {
5715 for (const auto& x : handlers) {
5716 const auto& pattern = x.first;
5717 const auto& handler = x.second;
5718
5719 if (std::regex_match(req.path, req.matches, pattern)) {
5720 handler(req, res, content_reader);
5721 return true;
5722 }
5723 }
5724 return false;
5725 }
5726
5727 inline bool
5728 Server::process_request(Stream& strm, bool close_connection,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected