Skip to content

Commit a54f7a7

Browse files
committed
Added comment
1 parent 4906280 commit a54f7a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Github/HttpClient/Cache/ResponseSerializer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public static function serialize(ResponseInterface $response, StreamFactory $str
2828
if ($bodyStream->isSeekable()) {
2929
$bodyStream->rewind();
3030
} else {
31+
/*
32+
* If the body is not seekbable we can not rewind it. The stream could be a type of stream
33+
* that you only can read once. That is why we have to replace the old stream with a new one.
34+
*/
3135
$response = $response->withBody($streamFactory->createStream($body));
3236
}
3337

0 commit comments

Comments
 (0)