wrong Content-Length header if gzip encoding is enabled
|Status:||Needs Feedback||Start date:||2011-11-15|
|Priority:||Should have||Due date:|
if a client sends "Accept-Encoding: gzip, deflate" the calculated Content-Lenght is wrong which causes corrupted downloads (e.g. zip file which cannot be opened or content is corrupt after extracting).
I've fixed it by commenting out the "header('Content-Length: ' . $this->intFileSize);" in "class.tx_nawsecuredl_output.php" line 151.
A drawback is that browser's download status bar does not show the file size and estimated download time, size.
This is not nice, but better than having corrupted downloads.
There are some hints at stackoverflow, e.g. http://stackoverflow.com/questions/815961/how-to-determine-the-content-length-of-a-gzipped-file, but unfortinately I was not able to get it working including the suggested changes.
Does anyone know how to fix this correctly?