fix(operation): 修复操作日志中间件,record.Resp写错的问题 (#1342)
This commit is contained in:
@@ -113,7 +113,7 @@ func OperationRecord() gin.HandlerFunc {
|
||||
// 截断
|
||||
newBody := respPool.Get().([]byte)
|
||||
copy(newBody, record.Resp)
|
||||
record.Body = string(newBody)
|
||||
record.Resp = string(newBody)
|
||||
defer respPool.Put(newBody[:0])
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user