1
0
mirror of https://github.com/labstack/echo.git synced 2025-10-30 23:57:38 +02:00

Ensure proxy connection is closed in proxyRaw function

(#2837)
This commit is contained in:
kumapower17
2025-10-25 11:54:29 +08:00
committed by Martti T.
parent e644ff8f7b
commit 53b692c4d4

View File

@@ -158,6 +158,7 @@ func proxyRaw(t *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
c.Set("_error", echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("proxy raw, dial error=%v, url=%s", err, t.URL)))
return
}
defer out.Close()
// Write header
err = r.Write(out)