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