Skip to content

Commit

Permalink
reset request body with reader copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Springer committed Jul 21, 2019
1 parent f0c859b commit 18b756d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (c *Client) Middleware(next http.Handler) http.Handler {
next.ServeHTTP(w, r)
return
}
reader := ioutil.NopCloser(bytes.NewBuffer(body))
key = generateKeyWithBody(r.URL.String(), body)
r.Body = reader
}

params := r.URL.Query()
Expand Down

0 comments on commit 18b756d

Please sign in to comment.