Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
Signed-off-by: chaoqin-li1123 <chaoqinli@google.com>
  • Loading branch information
chaoqin-li1123 committed Mar 29, 2021
1 parent b32053a commit 9ed6baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/http/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ Utility::getLastAddressFromXFF(const Http::RequestHeaderMap& request_headers,
// practice, we are working with a view at the end of the owning string, and could pass the
// raw pointer.
// TODO(mattklein123) PERF: Avoid the copy here.
Network::Address::InstanceConstSharedPtr address = Network::Utility::parseInternetAddressNoThrow(
std::string(xff_string.data(), xff_string.size()));
Network::Address::InstanceConstSharedPtr address =
Network::Utility::parseInternetAddressNoThrow(std::string(xff_string));
if (address != nullptr) {
return {address, last_comma == std::string::npos && num_to_skip == 0};
}
Expand Down

0 comments on commit 9ed6baa

Please sign in to comment.