Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 00:30 UTC
encode: Fix infinite recursion (#5672)
Francis Lavoie committed
Aug 2, 2023 at 20:21 UTC
19139307833fcb36d8af612dfc982b49032f259e
1 file changed
+2
-2
modules/caddyhttp/encode/encode.go
+2
-2
@@ -212,7 +212,7 @@ func (rw *responseWriter) Flush() {
212
return
213
}
214
//nolint:bodyclose
215
- http.NewResponseController(rw).Flush()
215
+ http.NewResponseController(rw.ResponseWriter).Flush()
216
}
217
218
// 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) {
225
rw.wroteHeader = true
226
}
227
//nolint:bodyclose
228
- return http.NewResponseController(rw).Hijack()
228
+ return http.NewResponseController(rw.ResponseWriter).Hijack()
229
}
230
231
// Write writes to the response. If the response qualifies,