Fix cache corruption due to recorder reuse

Former-commit-id: b37ba1a3d48469613827333e20c9b75e3fd0cc44
This commit is contained in:
Hendrik Hofstadt 2018-11-30 00:51:47 +01:00 committed by GitHub
parent 02d94041f9
commit 2573a3e940

View File

@ -115,7 +115,8 @@ func (e *Entry) Reset(statusCode int, headers map[string][]string,
e.response.headers = newHeaders
}
e.response.body = body
e.response.body = make([]byte,len(body))
copy(e.response.body, body)
// check if a given life changer provided
// and if it does then execute the change life time
if lifeChanger != nil {