We have a website for handling and processing RMA requests for our clients that we recently added to Cloudflare. This website has an option to export RMA data in the form of a .CSV file from the admin panel.
After switching our DNS to Cloudflare we are having a problem with this feature. It goes as follows:
- an Ajax GET request is made to generate the file and initiate the download
- after the file has been generated a response is received with the following header:
HTTP/2.0 200 OK
date: Thu, 09 May 2019 15:41:02 GMT
content-disposition: attachment; filename=[redacted].csv;
expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
- the exported file is in the response and a file download is being initiated in the browser
- the download fails a split second after it has started (Chrome displays “Network Error”, Firefox displays “[filename] could not be saved, because the source file could not be read.”).
This problem does not occur if I set my hosts file to point to the server directly without going through Cloudflare.
I’ve tried to figure out why this is happening and how to fix it, but I haven’t been able to find any real solution. A similar issue seems to be described here: Downloads are failing - timing out , however, our downloads are containing the correct file size and are being interrupted way before the specified file size is reached.
Any ideas why this is happening?