Fix reference to the IPv6 URI format RFC

pull/25342/head
Adam J Heller 4 years ago committed by GitHub
parent 75c736b539
commit 648a40f90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/lib/iomgr/sockaddr_utils.cc

@ -183,7 +183,7 @@ std::string grpc_sockaddr_to_string(const grpc_resolved_address* resolved_addr,
if (ip != nullptr && grpc_inet_ntop(addr->sa_family, ip, ntop_buf, if (ip != nullptr && grpc_inet_ntop(addr->sa_family, ip, ntop_buf,
sizeof(ntop_buf)) != nullptr) { sizeof(ntop_buf)) != nullptr) {
if (sin6_scope_id != 0) { if (sin6_scope_id != 0) {
// Enclose sin6_scope_id with the format defined in RFC 6784 section 2. // Enclose sin6_scope_id with the format defined in RFC 6874 section 2.
std::string host_with_scope = std::string host_with_scope =
absl::StrFormat("%s%%25%" PRIu32, ntop_buf, sin6_scope_id); absl::StrFormat("%s%%25%" PRIu32, ntop_buf, sin6_scope_id);
out = grpc_core::JoinHostPort(host_with_scope, port); out = grpc_core::JoinHostPort(host_with_scope, port);

Loading…
Cancel
Save