8000 bug #50266 [HttpFoundation] Fix file streaming after connection abort… · symfony/symfony@8048ab5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8048ab5

Browse files
bug #50266 [HttpFoundation] Fix file streaming after connection aborted (rlshukhov)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpFoundation] Fix file streaming after connection aborted | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | no | License | MIT | Doc PR | no After connection aborted HttpFoundation/BinaryFileResponse.php will stream file until it's end. This fix add connection aborted checks. Commits ------- adb9393 [HttpFoundation] Fix file streaming after connection aborted
2 parents 22edd15 + adb9393 commit 8048ab5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public function sendContent()
349349
while ('' !== $data) {
350350
$read = fwrite($out, $data);
351351
if (false === $read || connection_aborted()) {
352-
break;
352+
break 2;
353353
}
354354
if (0 < $length) {
355355
$length -= $read;

0 commit comments

Comments
 (0)
0