| 5576 | } |
| 5577 | |
| 5578 | inline bool Server::dispatch_request(Request& req, Response& res, |
| 5579 | const Handlers& handlers) { |
| 5580 | for (const auto& x : handlers) { |
| 5581 | const auto& pattern = x.first; |
| 5582 | const auto& handler = x.second; |
| 5583 | |
| 5584 | if (std::regex_match(req.path, req.matches, pattern)) { |
| 5585 | handler(req, res); |
| 5586 | return true; |
| 5587 | } |
| 5588 | } |
| 5589 | return false; |
| 5590 | } |
| 5591 | |
| 5592 | inline void Server::apply_ranges(const Request& req, Response& res, |
| 5593 | std::string& content_type, |
nothing calls this directly
no outgoing calls
no test coverage detected