yarpc / yarpc-go

A message passing platform for Go
MIT License
411 stars 103 forks source link

yarpc outbound leaking implementation detail using http.Client #1565

Closed AllenLuUber closed 5 years ago

AllenLuUber commented 6 years ago

Currently, if you send a HTTP server request with Request.RequestURI field set using Outbound RoundTripper, it will fail with error:

code:unknown message:unknown error from http client: Get http://127.0.0.1:55797/foo/bar: http: Request.RequestURI can't be set

Either yarpc implementation should reset Request.RequestURI on behalf of the user or it should change its implementation to use a RoundTripper. We prefer to go with the latter solution.

kriskowal commented 6 years ago

Constructing an HTTP transport and bypassing the Client sounds good to me if we can make it work.