@marcel91200 / caddy Mirror · read-only / commits / 3b9eae70
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

reverseproxy: Change 500 error to 502 for lookup_srv config (#3771)

Fixes #3763

Aleksei committed Oct 1, 2020 at 23:02 UTC 3b9eae70c9cc680792cdc86513f74f7cc49f43b1
1 file changed +2 -1
modules/caddyhttp/reverseproxy/reverseproxy.go
+2 -1
@@ -384,7 +384,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht
384 // DialInfo struct should have valid network address syntax
385 dialInfo, err := upstream.fillDialInfo(r)
386 if err != nil {
387 - return fmt.Errorf("making dial info: %v", err)
387 + err = fmt.Errorf("making dial info: %v", err)
388 + return caddyhttp.Error(http.StatusBadGateway, err)
389 }
390
391 // attach to the request information about how to dial the upstream;