Tendermint version: master
What happened: while using the jsonrpc client on load balancers which route to endpoints via path (ex: host.com:443/tmrpc) the address of the client is parsed in a not valid format.
How to reproduce it:
func TestEndpoint(t *testing.T) {
x, err := rpchttp.New("https://example.com:443/rpc", "")
if err != nil {
t.Fatal(err)
}
_, err = x.Status(context.TODO())
if err != nil {
t.Fatal(err)
}
}
This happens because the address is set here using the GetTrimmedHostWithPath function which ends up creating an URI with an invalid port (ex: :443.rpc).
I could provide a fast fix, but I'm not sure why the '/' to '.' replacement is done.