]> source.dussan.org Git - nextcloud-server.git/commit
Correctly read the full stream in file_get_contents
authorVincent Petry <pvince81@owncloud.com>
Mon, 31 Mar 2014 16:36:52 +0000 (18:36 +0200)
committerVincent Petry <pvince81@owncloud.com>
Tue, 1 Apr 2014 08:07:16 +0000 (10:07 +0200)
commitd6ce45fe61c05c0779cfaa3207a538a7a5b9a04c
treec5fbd10a2bf10b5867ae89d2b06f2ae6e9e05919
parentab696edba685cd6d2a64c2e48907f03197aae53f
Correctly read the full stream in file_get_contents

When using user-defined stream wrappers, PHP will
return a maximum of 8192 bytes even if more was
requested.

This fix uses stream_get_contents to make sure the full stream is read
and not only the first 8 KB.

Added unit test with a bigger test file to cover this case.
lib/private/files/storage/common.php
tests/data/lorem-big.txt [new file with mode: 0644]
tests/lib/files/storage/storage.php