How to reproduce
- Configure a system with apache as webserver using GZIP module enabled
- Make sure you have rules to exclude GZIP for already compressed mime types such as mp3 files
- Create a course with a task element
- Upload an mp3 file as task
- As uses, try downloading the task
=> When using Firefox, the mp3 is broken (length does not match)
The problem is that the link does not contain the filename.mp3 and thus the Apache gzip filter exclusion rule is not applied. It is a known Firefox bug that Firefox can not deal with mp3 files that are delivered gziped.
The solution is to add a method on the Link element to set the link name and to render the link name properly in the link: link_to_oo_link_component/linkname.mp3 The linkname.mp3 extension will not be used in anyway by OpenOLAT, it is just for the browser.
When implementing the fix it must be made a quick check where this problem does also apply (please extend list here with found instances):
- Single page file download