Skip to content

Commit 3e8eca8

Browse files
authored
Revert "client: encode the authority by default (#6318)" (#6365)
This reverts commit 68576b3.
1 parent 1c0572a commit 3e8eca8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

clientconn.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,12 +1872,7 @@ func (cc *ClientConn) determineAuthority() error {
18721872
// the channel authority given the user's dial target. For resolvers
18731873
// which don't implement this interface, we will use the endpoint from
18741874
// "scheme://authority/endpoint" as the default authority.
1875-
1876-
// Path escape the endpoint to handle use cases where the endpoint
1877-
// might not be a valid authority by default.
1878-
// For example an endpoint which has multiple paths like
1879-
// 'a/b/c', which is not a valid authority by default.
1880-
cc.authority = url.PathEscape(endpoint)
1875+
cc.authority = endpoint
18811876
}
18821877
channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority)
18831878
return nil

test/authority_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ var authorityTests = []authorityTest{
126126
name: "UnixPassthrough",
127127
address: "/tmp/sock.sock",
128128
target: "passthrough:///unix:///tmp/sock.sock",
129-
authority: "unix:%2F%2F%2Ftmp%2Fsock.sock",
129+
authority: "unix:///tmp/sock.sock",
130130
dialTargetWant: "unix:///tmp/sock.sock",
131131
},
132132
{

0 commit comments

Comments
 (0)