Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Fixed cache key
Browse files Browse the repository at this point in the history
The request's body is not correctly serialized since it's a stream, so the key can be the same for requests having just a different body.
Type casting to string resolves the problem.
  • Loading branch information
rpg600 committed Aug 21, 2015
1 parent 079fc43 commit 79ffb33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GuzzleHttp/Cache/DoctrineAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private function getKey(RequestInterface $request)
'method' => $request->getMethod(),
'uri' => $request->getUrl(),
'headers' => $request->getHeaders(),
'body' => $request->getBody(),
'body' => (string) $request->getBody(),
]));
}
}

0 comments on commit 79ffb33

Please sign in to comment.