Skip to content

Commit

Permalink
chore: fix typo in comments
Browse files Browse the repository at this point in the history
s/ErroHandler/ErrorHandler/
  • Loading branch information
josgraha authored Jun 30, 2020
1 parent c034d4f commit 3acec8a
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 3acec8a

Please sign in to comment.