diff --git a/cache/entry/entry.go b/cache/entry/entry.go index 141d1ede..7beab739 100644 --- a/cache/entry/entry.go +++ b/cache/entry/entry.go @@ -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 {