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

Commit 79ffb33

Browse files
committed
Fixed cache key
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.
1 parent 079fc43 commit 79ffb33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GuzzleHttp/Cache/DoctrineAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private function getKey(RequestInterface $request)
4646
'method' => $request->getMethod(),
4747
'uri' => $request->getUrl(),
4848
'headers' => $request->getHeaders(),
49-
'body' => $request->getBody(),
49+
'body' => (string) $request->getBody(),
5050
]));
5151
}
5252
}

0 commit comments

Comments
 (0)