Large file downloads fail when chunked encoding is enabled
|Reported by:||dsilverman||Owned by:||somebody|
Users were reporting that mp3 files would download only the first several seconds in the browser rather than the complete file. I noticed that the server was sending the data (via the wp-content/blogs.php file) as chunked encoding, but was not passing a content-length header. After the first chunk, the file stopped downloading. I added a <code>@header( 'Content-Length: ' . filesize($file) );</code> into the blogs.php file and the problem is solved, although headers now report that chunked encoding is no longer enabled.
Change History (5)
comment:3 @momo360modena — 7 years ago
- Resolution fixed deleted
- Status changed from closed to reopened