Skip to content

Commit

Permalink
Close fastcgi request on range responses as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 24, 2016
1 parent 7ebc261 commit e6a06c5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Http/ResponseEmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ public function emit(ResponseInterface $response, $maxBufferLength = 8192)
$this->flush();

$range = $this->parseContentRange($response->getHeaderLine('Content-Range'));

if (is_array($range)) {
$this->emitBodyRange($range, $response, $maxBufferLength);

return;
} else {
$this->emitBody($response, $maxBufferLength);
}

$this->emitBody($response, $maxBufferLength);

if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
}
Expand Down

0 comments on commit e6a06c5

Please sign in to comment.