1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

encode: Fix infinite recursion (#5672)

This commit is contained in:
Francis Lavoie 2023-08-02 20:21:11 -04:00 committed by GitHub
parent cd486c25d1
commit 1913930783
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,