aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/reverseproxy/reverseproxy.go
diff options
context:
space:
mode:
authorAleksei <[email protected]>2020-10-01 23:02:31 +0300
committerGitHub <[email protected]>2020-10-01 14:02:31 -0600
commit3b9eae70c9cc680792cdc86513f74f7cc49f43b1 (patch)
tree3cf5728f0e5fb918e70f541d015ecab8430abd35 /modules/caddyhttp/reverseproxy/reverseproxy.go
parentaa9c3eb7324461c0dd4f1dd28e767d0b8d0d7ec3 (diff)
downloadcaddy-3b9eae70c9cc680792cdc86513f74f7cc49f43b1.tar.gz
caddy-3b9eae70c9cc680792cdc86513f74f7cc49f43b1.zip
reverseproxy: Change 500 error to 502 for lookup_srv config (#3771)
Fixes #3763
Diffstat (limited to 'modules/caddyhttp/reverseproxy/reverseproxy.go')
-rw-r--r--modules/caddyhttp/reverseproxy/reverseproxy.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go
index 138a3fc84..0f93df0ee 100644
--- a/modules/caddyhttp/reverseproxy/reverseproxy.go
+++ b/modules/caddyhttp/reverseproxy/reverseproxy.go
@@ -384,7 +384,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht
// DialInfo struct should have valid network address syntax
dialInfo, err := upstream.fillDialInfo(r)
if err != nil {
- return fmt.Errorf("making dial info: %v", err)
+ err = fmt.Errorf("making dial info: %v", err)
+ return caddyhttp.Error(http.StatusBadGateway, err)
}
// attach to the request information about how to dial the upstream;