Skip to content

Commit

Permalink
Revert "client: encode the authority by default (#6318)" (#6365)
Browse files Browse the repository at this point in the history
This reverts commit 68576b3.
  • Loading branch information
zasweq committed Jun 9, 2023
1 parent 1c0572a commit 3e8eca8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/authority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
{
Expand Down

0 comments on commit 3e8eca8

Please sign in to comment.