From 08d20bb26b2fdbe38294e5a11b57d74d37816464 Mon Sep 17 00:00:00 2001 From: Zach Reyes Date: Fri, 9 Jun 2023 16:07:08 -0400 Subject: [PATCH] Revert "client: encode the authority by default (#6318)" This reverts commit 68576b3c42bbecacfeba3bee89f509f1bb7b0072. --- clientconn.go | 7 +------ test/authority_test.go | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/clientconn.go b/clientconn.go index a27c0573dc1d..95a7459b02f6 100644 --- a/clientconn.go +++ b/clientconn.go @@ -1872,12 +1872,7 @@ func (cc *ClientConn) determineAuthority() error { // the channel authority given the user's dial target. For resolvers // which don't implement this interface, we will use the endpoint from // "scheme://authority/endpoint" as the default authority. - - // Path escape the endpoint to handle use cases where the endpoint - // might not be a valid authority by default. - // For example an endpoint which has multiple paths like - // 'a/b/c', which is not a valid authority by default. - cc.authority = url.PathEscape(endpoint) + cc.authority = endpoint } channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority) return nil diff --git a/test/authority_test.go b/test/authority_test.go index a4d481f24f92..44095a23a2fe 100644 --- a/test/authority_test.go +++ b/test/authority_test.go @@ -126,7 +126,7 @@ var authorityTests = []authorityTest{ name: "UnixPassthrough", address: "/tmp/sock.sock", target: "passthrough:///unix:///tmp/sock.sock", - authority: "unix:%2F%2F%2Ftmp%2Fsock.sock", + authority: "unix:///tmp/sock.sock", dialTargetWant: "unix:///tmp/sock.sock", }, {