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
The director field in the reverse proxy struct cannot communicate that the 'rebuilding' of the request failed. Hence, there's no way for the director to stop the request from being transported further.
What did you expect to see?
The director should be able to return an error or by some other means tell the reverse proxy that it failed making the resulting request broken.
The result of the director failing should probably be something along the lines of HTTP 500/502 error being returned to the client and the request not sent anywhere.
What did you see instead?
The request gets sent along as if the director succeeded, even if it didn't
The text was updated successfully, but these errors were encountered:
For go1compat reasons, we can't change the signature, so your best bet is probably to supply a custom Transport or just have your own http.Handler/HandlerFunc that validates the request before you delegate to ReverseProxy.ServeHTTP. The ReverseProxy is just another http.Handler which are all composable.
Isn't this something that could be amended next time the API is broken anyway? In my opinion, this should really be fixed so we don't have to resort to hackish solutions around this forever.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not related to specific Go release
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I use a ReverseProxy from the httputil package.
The director field in the reverse proxy struct cannot communicate that the 'rebuilding' of the request failed. Hence, there's no way for the director to stop the request from being transported further.
What did you expect to see?
The director should be able to return an error or by some other means tell the reverse proxy that it failed making the resulting request broken.
The result of the director failing should probably be something along the lines of HTTP 500/502 error being returned to the client and the request not sent anywhere.
What did you see instead?
The request gets sent along as if the director succeeded, even if it didn't
The text was updated successfully, but these errors were encountered: