Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://commondatastorage.googleapis.com/chromium-boringssl-docs/fips/boringssl-66005f41fbc3529ffe8d007708756720529da20d.tar.xz"],
),
com_google_absl = dict(
sha256 = "190b0c9e65ef0866b44c54b517b5a3e15b67a1001b34547f03f8f4d8553c2851",
strip_prefix = "abseil-cpp-63ee2f8877915a3565c29707dba8fe4d7822596a",
# 2020-01-08
urls = ["https://github.com/abseil/abseil-cpp/archive/63ee2f8877915a3565c29707dba8fe4d7822596a.tar.gz"],
sha256 = "2693730730247afb0e7cb2d41664ac2af3ad75c79944efd266be40ba944179b9",
strip_prefix = "abseil-cpp-06f0e767d13d4d68071c4fc51e25724e0fc8bc74",
# 2020-03-03
urls = ["https://github.com/abseil/abseil-cpp/archive/06f0e767d13d4d68071c4fc51e25724e0fc8bc74.tar.gz"],
),
com_github_apache_thrift = dict(
sha256 = "7d59ac4fdcb2c58037ebd4a9da5f9a49e3e034bf75b3f26d9fe48ba3d8806e6b",
Expand Down Expand Up @@ -275,10 +275,10 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://storage.googleapis.com/quiche-envoy-integration/38cc1ee6a89a4d0b52cf2a611bdc09312bcd2c5c.tar.gz"],
),
com_google_cel_cpp = dict(
sha256 = "b4eaf871d4910c599bb70eaef2eec852747989f15f26885353b7c5188a940ca8",
strip_prefix = "cel-cpp-4767e5de36c5701fa8ea46d7de3765161ef98353",
# 2019-11-28
urls = ["https://github.com/google/cel-cpp/archive/4767e5de36c5701fa8ea46d7de3765161ef98353.tar.gz"],
sha256 = "326ec397b55e39f48bd5380ccded1af5b04653ee96e769cd4d694f9a3bacef50",
strip_prefix = "cel-cpp-80e1cca533190d537a780ad007e8db64164c582e",
# 2020-02-26
urls = ["https://github.com/google/cel-cpp/archive/80e1cca533190d537a780ad007e8db64164c582e.tar.gz"],
),
com_googlesource_code_re2 = dict(
sha256 = "7268e1b4254d9ffa5ccf010fee954150dbb788fd9705234442e7d9f0ee5a42d3",
Expand Down
3 changes: 2 additions & 1 deletion source/common/http/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,8 @@ Utility::AuthorityAttributes Utility::parseAuthority(absl::string_view host) {
// but we still need to trim the brackets to send the IPv6 address into the DNS resolver. For
// now, just do all the trimming here, but in the future we should consider whether we can
// have unified [] handling as low as possible in the stack.
if (potential_ip_address.front() == '[' && potential_ip_address.back() == ']') {
if (!potential_ip_address.empty() && potential_ip_address.front() == '[' &&
potential_ip_address.back() == ']') {
potential_ip_address.remove_prefix(1);
potential_ip_address.remove_suffix(1);
}
Expand Down
3 changes: 2 additions & 1 deletion test/common/http/utility_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ TEST(HttpUtility, CheckIsIpAddress) {
std::make_tuple(false, "example.com:8000", "example.com", 8000),
std::make_tuple(false, "example.com:abc", "example.com:abc", absl::nullopt),
std::make_tuple(false, "localhost:10000", "localhost", 10000),
std::make_tuple(false, "localhost", "localhost", absl::nullopt)};
std::make_tuple(false, "localhost", "localhost", absl::nullopt),
std::make_tuple(false, "", "", absl::nullopt)};

for (const auto& pattern : patterns) {
bool status_pattern = std::get<0>(pattern);
Expand Down