diff options
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_transaction.cc | 3 | ||||
-rw-r--r-- | net/http/http_server_properties_impl.cc | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 76e352e..7fe07c6 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -1444,7 +1444,8 @@ void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) { return; const std::string& host = request_->url.host(); - bool is_google = base::EndsWith(host, "google.com", true) && + bool is_google = base::EndsWith(host, "google.com", + base::CompareCase::SENSITIVE) && (host.size() == 10 || host[host.size() - 11] == '.'); if (is_google) { // Some fraction of successful connections use the fallback, but only due to diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc index 15871b5..d1c259e 100644 --- a/net/http/http_server_properties_impl.cc +++ b/net/http/http_server_properties_impl.cc @@ -117,7 +117,8 @@ void HttpServerPropertiesImpl::InitializeAlternativeServiceServers( for (AlternativeServiceMap::const_iterator it = alternative_service_map_.begin(); it != alternative_service_map_.end(); ++it) { - if (base::EndsWith(it->first.host(), canonical_suffixes_[i], false)) { + if (base::EndsWith(it->first.host(), canonical_suffixes_[i], + base::CompareCase::INSENSITIVE_ASCII)) { canonical_host_to_origin_map_[canonical_host] = it->first; break; } @@ -260,7 +261,8 @@ std::string HttpServerPropertiesImpl::GetCanonicalSuffix( // suffix. for (size_t i = 0; i < canonical_suffixes_.size(); ++i) { std::string canonical_suffix = canonical_suffixes_[i]; - if (base::EndsWith(host, canonical_suffixes_[i], false)) { + if (base::EndsWith(host, canonical_suffixes_[i], + base::CompareCase::INSENSITIVE_ASCII)) { return canonical_suffix; } } @@ -368,7 +370,8 @@ bool HttpServerPropertiesImpl::SetAlternativeServices( // canonical host. for (size_t i = 0; i < canonical_suffixes_.size(); ++i) { std::string canonical_suffix = canonical_suffixes_[i]; - if (base::EndsWith(origin.host(), canonical_suffixes_[i], false)) { + if (base::EndsWith(origin.host(), canonical_suffixes_[i], + base::CompareCase::INSENSITIVE_ASCII)) { HostPortPair canonical_host(canonical_suffix, origin.port()); canonical_host_to_origin_map_[canonical_host] = origin; break; @@ -611,7 +614,8 @@ HttpServerPropertiesImpl::CanonicalHostMap::const_iterator HttpServerPropertiesImpl::GetCanonicalHost(HostPortPair server) const { for (size_t i = 0; i < canonical_suffixes_.size(); ++i) { std::string canonical_suffix = canonical_suffixes_[i]; - if (base::EndsWith(server.host(), canonical_suffixes_[i], false)) { + if (base::EndsWith(server.host(), canonical_suffixes_[i], + base::CompareCase::INSENSITIVE_ASCII)) { HostPortPair canonical_host(canonical_suffix, server.port()); return canonical_host_to_origin_map_.find(canonical_host); } |