Files can not be downloaded

Hi, Did anyone else have a problem downloading files from your own website when you added a site to your Cloudflare?

If you have Scrape Shield turned on, that may cause an issue depending on how you’re initiating the download.

I have disabled these options - no changes

What happens when you try to download? And how are you initiating the download?

When I try to download the file I get an error: “disconnect - network error” (This message shows a web browser).

The problem is in flexible ssl. If ssl is working you can not download files, and if you do not have ssl it’s all right. How to set up SSL to download files from my website?

The problem is likely because you’re streaming the file. If your server is reporting a different file size at the beginning of the download than the actual file size that is a problem in http where it’s expected the server actually report the correct value.


Is there any way out of this situation?

4 ways I can think of…
Point to the actual file instead of creating it on the fly.
Report the correct file size.
Disable http2 in Cloudflare settings (may need to be done via the API).
Pull the files to be downloaded from a :grey: host/URL.


8 posts were split to a new topic: HTTP Error on Large Files (FR)

Hi @cscharff

I ran into the exact same problem. Disabling http2 did the trick. But for obvious reasons I want to keep http2 on. Since I am using a plugin for those pdf downloads on my WooCommerce install it might be difficult to get the developer fix the reported file size. (The plugin uses an external library for PDF creation and streaming).

Is there not a way to let Cloudflare ignore the wrong file size?

Also, when streaming a file, do you think it is possible at all to report the correct size before the stream is over?

I have the same problem.
Can’t download small files when http2 is turned on.
How can I fix it?

I also have the same problem, and when attempting to turn of HTTP2 via the API as suggested by @cscharff and successfully implemented by @alekthewolf, I am receiving the following error message from the API

    "success": false,
    "errors": [
            "code": 1015,
            "message": "Not allowed to edit setting for http2"
    "messages": [],
    "result": null

We also are experiencing this issue, in Chrome files hit 1,503kb and then eventually timeout. If we disable Cloudflare the downloads work fine.

We’re also seeing the same error as @ross1 when trying to turn off http2 via the api. How can we resolve the issue/turn off http2?

I’m experiencing the same issue downloading csv exports from Wordpress.
Turning off http/2 fixes the issue but we want http/2 for page speed
What’s the solution?
Is the only fix to require the plugin developer to fix the plugin to report correct file size?

I have turn off the http/2 , even after the issue not yet solved for me. still am getting "failed -Network error

I had this same problem when placing the CloudFlare in my PrestaShop store. After much research, I have realized that the problem was in how I had the code to download the zip file. I have placed the following code and everything has worked perfect. I hope I can help someone else:

header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: public");
    header("Content-Description: File Transfer");
    header("Content-Type: $mtype");
    header("Content-Length: ".$fsize);
    header("Content-Transfer-Encoding: binary");
    header("Content-Disposition: attachment; filename=\"$filename_download\"");

hey bro I have never realized that I have faced the same Issue but now after joining the community hope I will learn about the DNS and Security.