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
1 changed files with 2 additions and 2 deletions

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,