Skip to content

Commit 248e8f1

Browse files
committed
Make sure stream is seekable before using 'rewind()'
1 parent 3e65741 commit 248e8f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Responses/SymfonyResponseFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public function create(FilesystemInterface $cache, $path)
4646
}
4747

4848
$response->setCallback(function () use ($stream) {
49-
//rewind($stream);
49+
if (ftell($stream) !== 0) {
50+
rewind($stream);
51+
}
5052
fpassthru($stream);
5153
fclose($stream);
5254
});

0 commit comments

Comments
 (0)