diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-09 13:15:50 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-09 13:15:50 -0700 |
commit | 799d4ad54932f387e0f852833b5ac3377c760b32 (patch) | |
tree | 4a99caba860f8b604124ac54770b4c50bd999df4 /vendor/sabre/http/lib/Sapi.php | |
parent | 024d2737d001fe1bbae3b4310c7e205d2c014c6f (diff) | |
parent | 8dcdcd55e5c949ad7fed16d0edc92d0db3689470 (diff) | |
download | volse-hubzilla-799d4ad54932f387e0f852833b5ac3377c760b32.tar.gz volse-hubzilla-799d4ad54932f387e0f852833b5ac3377c760b32.tar.bz2 volse-hubzilla-799d4ad54932f387e0f852833b5ac3377c760b32.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'vendor/sabre/http/lib/Sapi.php')
-rw-r--r-- | vendor/sabre/http/lib/Sapi.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/sabre/http/lib/Sapi.php b/vendor/sabre/http/lib/Sapi.php index 6c83c8719..6fc6452e4 100644 --- a/vendor/sabre/http/lib/Sapi.php +++ b/vendor/sabre/http/lib/Sapi.php @@ -75,7 +75,15 @@ class Sapi { if ($contentLength !== null) { $output = fopen('php://output', 'wb'); if (is_resource($body) && get_resource_type($body) == 'stream') { - stream_copy_to_stream($body, $output, $contentLength); + if (PHP_INT_SIZE !== 4){ + // use the dedicated function on 64 Bit systems + stream_copy_to_stream($body, $output, $contentLength); + } else { + // workaround for 32 Bit systems to avoid stream_copy_to_stream + while (!feof($body)) { + fwrite($output, fread($body, 8192)); + } + } } else { fwrite($output, $body, $contentLength); } |