diff --git a/src/main/php/web/handler/FilesFrom.class.php b/src/main/php/web/handler/FilesFrom.class.php index 9c8ddac6..0d52e75f 100755 --- a/src/main/php/web/handler/FilesFrom.class.php +++ b/src/main/php/web/handler/FilesFrom.class.php @@ -77,7 +77,7 @@ private function copy($out, $file, $range) { $length= $range->length(); while ($length && $chunk= $file->read(min(self::CHUNKSIZE, $length))) { - yield 'write' => $out; + yield 'write' => null; $out->write($chunk); $length-= strlen($chunk); } @@ -129,7 +129,7 @@ public function serve($request, $response, $target, $mimeType= null) { $file->open(File::READ); try { do { - yield 'write' => $out; + yield 'write' => null; $out->write($file->read(self::CHUNKSIZE)); } while (!$file->eof()); } finally {