I have a download script written in php which works fine BUT I've been running into problems allowing users to download .zip files of between 300 and 600mb from a hosted server. Files of around 70mb download fine but larger ones are either incomplete or corrupt. I've been reading that this problem could be caused by gzip being enabled on the server.
As the server is hosted I have no way of editng the apache config file to disable gzip. Is there another way? I've tried adding the code below
to the .htaccess file that I created in the same directory as the php
download script but it did not disable gzip.
#Disable GZIP in directory
RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
What can I do to disable gzip?
This is what the repsonse headers are sending back when I try to download.
Cache-Control max-age=604800
Connection keep-alive
Content-Encoding gzip
Content-Type text/html; charset=UTF-8
Date Tue, 13 Feb 2018 16:12:05 GMT
Expires Tue, 20 Feb 2018 16:12:05 GMT
Server nginx/1.12.2
Transfer-Encoding chunked