Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http/httputil: ReverseProxy should use StatusBadGateway if backend can't be connected #9864

Closed
porjo opened this issue Feb 13, 2015 · 2 comments
Milestone

Comments

@porjo
Copy link

porjo commented Feb 13, 2015

When using net/http/httputil ReverseProxy where the upstream server is, for example, refusing connections the HTTP status code returned is StatusInternalServerError. It would be more appropriate (and helpful to the client) to return StatusBadGateway.

Looking at the underlying code for http.Transport, it looks like there is no way to differentiate between the two classes of error at the moment.

@minux minux changed the title ReverseProxy error 500 net/http/httputil: ReverseProxy should use StatusBadGateway if backend can't be connected Feb 14, 2015
@bradfitz bradfitz added this to the Go1.5Maybe milestone Mar 27, 2015
@rsc rsc removed the repo-main label Apr 14, 2015
@rsc rsc modified the milestones: Unplanned, Go1.5Maybe Jul 15, 2015
@bradfitz bradfitz self-assigned this Mar 31, 2016
@bradfitz bradfitz modified the milestones: Go1.7, Unplanned Mar 31, 2016
@bradfitz
Copy link
Contributor

@gopherbot
Copy link

CL https://golang.org/cl/21363 mentions this issue.

@golang golang locked and limited conversation to collaborators Apr 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants