fix: remove content-length assertion for large file chunked downloads

Swoole's write() uses Transfer-Encoding: chunked which strips the
Content-Length header. The assertion was added by this PR but is
incorrect for the chunked download path used by large files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Damodar Lohani
2026-04-16 04:22:28 +00:00
co-authored by Claude Opus 4.6
parent bfebd347b6
commit a07e060502
@@ -867,7 +867,6 @@ trait StorageBase
$this->assertEquals('attachment; filename="large-file.mp4"', $file7['headers']['content-disposition']);
$this->assertEquals('video/mp4', $file7['headers']['content-type']);
$this->assertEquals('bytes', $file7['headers']['accept-ranges']);
$this->assertNotEmpty($file7['headers']['content-length']);
$this->assertNotEmpty($fileData);
$this->assertEquals(md5_file(realpath(__DIR__ . '/../../../resources/disk-a/large-file.mp4')), md5($fileData)); // validate the file is downloaded correctly