| #include "processing.hpp" | |
| #include <boost/algorithm/string/predicate.hpp> | |
| bool getWellKnown( | |
| const boost::container::flat_map<std::string, std::string>& owners, | |
| const std::string& request, std::string& wellKnown) | |
| { | |
| // If it's already a well known name, just return | |
| if (!boost::starts_with(request, ":")) | |
| { | |
| wellKnown = request; | |
| return true; | |
| } | |
| auto it = owners.find(request); | |
| if (it == owners.end()) | |
| { | |
| return false; | |
| } | |
| wellKnown = it->second; | |
| return true; | |
| } |