mod_xsendfile serving download.php and not the filename

Posted by azz0r on Stack Overflow See other posts from Stack Overflow or by azz0r
Published on 2010-05-25T12:48:36Z Indexed on 2010/05/25 12:51 UTC
Read the original article Hit count: 271

Filed under:
|

Hello,

The apache mod_xsendfile is a good solution for what I want but its not working properly.

In firefox it serves the file but as download.php (name of the file with the code in).

In safari and chrome it serves an empty file.

Here is my code:

    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; file="test_hi.wmv"');
    header('X-Sendfile: /sites/dot.com/trunk/public/files/store/b/test_hi.wmv');
    exit;

Anyone used it before / have a solution

© Stack Overflow or respective owner

Related posts about apache

Related posts about modx