diff options
author | Francis Lavoie <[email protected]> | 2023-08-02 20:21:11 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-08-02 18:21:11 -0600 |
commit | 19139307833fcb36d8af612dfc982b49032f259e (patch) | |
tree | 772b7979bb7371083abf45a37d2c0e2f26c69889 | |
parent | cd486c25d168caf58f4b6fe5d3252df9432901ec (diff) | |
download | caddy-19139307833fcb36d8af612dfc982b49032f259e.tar.gz caddy-19139307833fcb36d8af612dfc982b49032f259e.zip |
encode: Fix infinite recursion (#5672)
-rw-r--r-- | modules/caddyhttp/encode/encode.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/encode/encode.go b/modules/caddyhttp/encode/encode.go index e906d0a2a..ed3e59dae 100644 --- a/modules/caddyhttp/encode/encode.go +++ b/modules/caddyhttp/encode/encode.go @@ -212,7 +212,7 @@ func (rw *responseWriter) Flush() { return } //nolint:bodyclose - http.NewResponseController(rw).Flush() + http.NewResponseController(rw.ResponseWriter).Flush() } // Hijack implements http.Hijacker. It will flush status code if set. We don't track actual hijacked @@ -225,7 +225,7 @@ func (rw *responseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { rw.wroteHeader = true } //nolint:bodyclose - return http.NewResponseController(rw).Hijack() + return http.NewResponseController(rw.ResponseWriter).Hijack() } // Write writes to the response. If the response qualifies, |