Skip to content

Commit

Permalink
Merge pull request #775 from josgraha/patch-1
Browse files Browse the repository at this point in the history
chore: fix typo in comments
  • Loading branch information
nathanejohnson committed Aug 14, 2020
2 parents c034d4f + 3acec8a commit ba04f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/http_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newHTTPProxy(target *url.URL, tr http.RoundTripper, flush time.Duration) ht
}

func httpProxyErrorHandler(w http.ResponseWriter, r *http.Request, err error) {
// According to https://golang.org/src/net/http/httputil/reverseproxy.go#L74, Go will return a 502 (Bad Gateway) StatusCode by default if no ErroHandler is provided
// According to https://golang.org/src/net/http/httputil/reverseproxy.go#L74, Go will return a 502 (Bad Gateway) StatusCode by default if no ErrorHandler is provided
// If a "context canceled" error is returned by the http.Request handler this means the client closed the connection before getting a response
// So we are changing the StatusCode on these situations to the non-standard 499 (Client Closed Request)

Expand Down

0 comments on commit ba04f7f

Please sign in to comment.