Skip to content

Commit c97666d

Browse files
committed
Fix Content-Length header to streamed response - refs BT#21970
1 parent 4b3b976 commit c97666d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CoreBundle/Controller/ResourceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ function () use ($resourceNode, $start, $length): void {
580580
);
581581
$response->headers->set('Content-Disposition', $disposition);
582582
$response->headers->set('Content-Type', $mimeType ?: 'application/octet-stream');
583-
$response->headers->set('Content-Length', (string) $resourceFile->getSize());
583+
$response->headers->set('Content-Length', (string) $length);
584584
$response->headers->set('Accept-Ranges', 'bytes');
585585
$response->headers->set('Content-Range', "bytes $start-$end/$fileSize");
586586
$response->setStatusCode(

0 commit comments

Comments
 (0)