Skip to content

Commit 43deea9

Browse files
authored
Merge pull request #8 from solocommand/empty-responses
Ensure empty response contents are not munged
2 parents 97cd17d + 36333ad commit 43deea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Task/TaskManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function filterResponse(FilterResponseEvent $event)
231231

232232
// Ensures minimum output has been set, otherwise PHP will not flush properly and tasks will hang the browser.
233233
$minOutputLen = PHP_INT_SIZE * 1024;
234-
if ($length < $minOutputLen) {
234+
if ($length < $minOutputLen && !$response->isEmpty()) {
235235
$padding = $minOutputLen - $length + 1;
236236
$response->setContent($content.str_pad('', $padding));
237237
}

0 commit comments

Comments
 (0)