Apache Sending “Content-Length : 0” , How to Fix

.htaccessapache-2.2configuration

I am using Apache server and it is sending Content-Length = 0 value which is preventing file-downloads, see – http://www.youtubedroid.com/download2.php?v=_3XcMEKNws0&title=Akhila+%2CMumbai+reloaded%2CSuper+dancer+2&hq=0 , here are my .htaccess content :

SetEnv no-gzip dont-vary

Here are headers sent by the server :

HTTP/1.1 200 OK
Date: Tue, 15 Dec 2009 06:12:11 GMT
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
X-Powered-By: PHP/5.2.11
Content-Description: File Transfer
Content-Disposition: attachment; filename="Akhila ,Mumbai reloaded,Super dancer 2.mp3"
Content-Transfer-Encoding: binary
Expires: 0
Cache-Control: must-revalidate, post-check=0, pre-check=0
Pragma: public
X-Sendfile: ./tmp/64eb3b185e38af95c15405ffb0606e76.mp3
Content-Length: 0
Keep-Alive: timeout=5, max=95
Connection: Keep-Alive
Content-Type: application/octet-stream

Pls. tell how to fix this ?

Best Answer

X-Sendfile header won't be sent by apache, so probably you haven't enabled xsendfile in that virtual host. When XSendFile is enabled, apache will be remove X-SendFile header and will sent the file.