| 6880 | } |
| 6881 | |
| 6882 | inline bool Server::dispatch_request(Request &req, Response &res, |
| 6883 | const Handlers &handlers) const { |
| 6884 | for (const auto &x : handlers) { |
| 6885 | const auto &matcher = x.first; |
| 6886 | const auto &handler = x.second; |
| 6887 | |
| 6888 | if (matcher->match(req)) { |
| 6889 | handler(req, res); |
| 6890 | return true; |
| 6891 | } |
| 6892 | } |
| 6893 | return false; |
| 6894 | } |
| 6895 | |
| 6896 | inline void Server::apply_ranges(const Request &req, Response &res, |
| 6897 | std::string &content_type, |