WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Zero download size (2 posts)

  1. pavelevap
    Member
    Posted 3 years ago #

    Hi, after activating W3 Total Cache my downloads stopped working. I can download them, but only with zero size. I use WP-DownloadManager plugin and I found following headers:

    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/force-download");
    header("Content-Type: application/octet-stream");
    header("Content-Type: application/download");
    header("Content-Disposition: attachment; filename=".basename($file_name).";");
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: ".filesize($file_path.$file_name));
    @readfile($file_path.$file_name);

    It looks like Content-Length is somehow damaged by W3 Total Cache.

    Related (not resolved) topic: http://wordpress.org/support/topic/plugin-w3-total-cache-download-script-fails-because-w3-total-cache-sends-its-own-content-length-header

    When I disable all cache types, everything works well (no need to deactivate the whole cache plugin). But when I activate any of cache (Browser or Page or something else), problem with zero size is back.

    Thank you for your help.

  2. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    Did the plugin author give advice on this? I recall this issue form years ago, but can't find the solution here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic