From 3acec8a5c1813d66eae6534f0940a6985a4de4d3 Mon Sep 17 00:00:00 2001 From: Joe Graham Date: Tue, 30 Jun 2020 10:24:12 -0400 Subject: [PATCH] chore: fix typo in comments s/ErroHandler/ErrorHandler/ --- proxy/http_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http_handler.go b/proxy/http_handler.go index 5cda47160..bbe04ff13 100644 --- a/proxy/http_handler.go +++ b/proxy/http_handler.go @@ -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)