You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty sure I have this right, but LMK if I'm wrong. Using my own Middleware to provide ProcessRequest it's too easy to override which host the RoundTripper will Dial thereby overriding which host I expect the Endpoint to specify.
request.Request.GetHttpRequest().URL is a pointer, so any edits to URL.Host are carry all the way through to the RoundTrip. Perhaps a quick override above this line to guarantee the Location dials the correct upstream host?
The text was updated successfully, but these errors were encountered:
davidbirdsong
changed the title
httploc. HttpLocation should ensure that the endpoint host is respected
httploc.HttpLocation should ensure that the endpoint host is respected
Jun 12, 2014
I've got Middleware the mucks with the http.Request object including the http.Request.URL object. I also have an Endpoint that explicitly sets the host that I want to the location to send to transport.RoundTrip
It's been awhile, but in my experience, I found that a Middleware.ProcessRequest that sets the http.Request.URL will affect which host is Dial'ed and that the host section of Endpoint.GetUrl() is not connected to.
Should this be the case? I figured Endpoint runs later and should override anything prior to it.
I'm pretty sure I have this right, but LMK if I'm wrong. Using my own Middleware to provide
ProcessRequest
it's too easy to override which host the RoundTripper will Dial thereby overriding which host I expect the Endpoint to specify.request.Request.GetHttpRequest().URL
is a pointer, so any edits toURL.Host
are carry all the way through to the RoundTrip. Perhaps a quick override above this line to guarantee the Location dials the correct upstream host?The text was updated successfully, but these errors were encountered: