feat: fix bodyWriter

This commit is contained in:
Samuel Berthe
2024-04-13 22:08:43 +02:00
parent 1d64e8b44a
commit dbdb412ef8
+1 -1
View File
@@ -20,7 +20,7 @@ type bodyWriter struct {
}
// implements gin.ResponseWriter
func (w bodyWriter) Write(b []byte) (int, error) {
func (w *bodyWriter) Write(b []byte) (int, error) {
if w.body != nil {
if w.body.Len()+len(b) > w.maxSize {
w.body.Write(b[:w.maxSize-w.body.Len()])