Following my previous question, in which I think I've narrowed my problem down to the bottleneck:
How do I set the correct value for the Content-Length
header for a downloadable file, from within PHP, when the webserver (apache) automatically compresses the ouput afterwards?
I'm looking for the most robust/generic solution. I'm not well informed about output compression, but I presume apache has several compression algorithms it can utilize (gzip, etc?). So, from within PHP, how would I automatically discover what compression the webserver uses, and how can I use this to set the correct Content-Length
header value for the filesize of the file (after it's been compressed)?