| 139 | } |
| 140 | |
| 141 | HostConfiguration * |
| 142 | Configuration::find(const char *host, int host_length) |
| 143 | { |
| 144 | HostConfiguration *host_configuration = host_configurations_[0]; |
| 145 | |
| 146 | if (host && host_length > 0 && host_configurations_.size() > 1) { |
| 147 | std::string shost(host, host_length); |
| 148 | |
| 149 | // ToDo: Maybe use std::find() here somehow? |
| 150 | for (HostContainer::iterator it = host_configurations_.begin() + 1; it != host_configurations_.end(); ++it) { |
| 151 | if ((*it)->host() == shost) { |
| 152 | host_configuration = *it; |
| 153 | break; |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | return host_configuration; |
| 159 | } |
| 160 | |
| 161 | bool |
| 162 | HostConfiguration::is_url_allowed(const char *url, int url_len) |
no test coverage detected