This commit is contained in:
Samuel Berthe
2024-01-20 19:22:20 +01:00
parent 083d462db9
commit d0c63b933e
+3 -1
View File
@@ -29,7 +29,7 @@ func (w bodyWriter) Write(b []byte) (int, error) {
} }
} }
w.bytes += len(b) w.bytes += len(b) //nolint:staticcheck
return w.ResponseWriter.Write(b) return w.ResponseWriter.Write(b)
} }
@@ -43,6 +43,7 @@ func newBodyWriter(writer gin.ResponseWriter, maxSize int, recordBody bool) *bod
ResponseWriter: writer, ResponseWriter: writer,
body: body, body: body,
maxSize: maxSize, maxSize: maxSize,
bytes: 0,
} }
} }
@@ -77,5 +78,6 @@ func newBodyReader(reader io.ReadCloser, maxSize int, recordBody bool) *bodyRead
ReadCloser: reader, ReadCloser: reader,
body: body, body: body,
maxSize: maxSize, maxSize: maxSize,
bytes: 0,
} }
} }