| 6683 | } |
| 6684 | |
| 6685 | inline bool Server::dispatch_request(Request &req, Response &res, |
| 6686 | const Handlers &handlers) const { |
| 6687 | for (const auto &x : handlers) { |
| 6688 | const auto &matcher = x.first; |
| 6689 | const auto &handler = x.second; |
| 6690 | |
| 6691 | if (matcher->match(req)) { |
| 6692 | handler(req, res); |
| 6693 | return true; |
| 6694 | } |
| 6695 | } |
| 6696 | return false; |
| 6697 | } |
| 6698 | |
| 6699 | inline void Server::apply_ranges(const Request &req, Response &res, |
| 6700 | std::string &content_type, |