I have an issue with FireFox where it can't download generated private file PDFs, yet Chrome has no such issue.
We populate PDF files with TCPDF and they get moved and copied into a few different directories. But ultimately, they're in directories in the private files directory behind the document root, with Drupal configured to look at this directory.
If I move any of these PDFs into the root of the site and access them directly with the URL, it works fine, but I wouldn't rule out the PDFs being corrupted in some small way. I've looked at the response headers when the file's downloading and all is in order, until I get this NS_ERROR_NET_PARTIAL_TRANSFER
message and it fails.
I've run with xdebug enabled and stepped through hook functions of hook_file_download and the headers generated there all seem ok too.
Other private PDFs that aren't generated can be downloaded no problem.
I'm really running out of ideas of what it could be regarding FireFox and the private files system.
content-length
andTransfer-Encoding
? - Further read daniel.haxx.se/blog/2015/02/12/…Content-Length
header! I just spotted that it's consistently larger in the header than the actual file's size! When we edit the value of filesize in the file_managed table to the value specified on the server, it works perfectly. So I have another issue in how Drupal saves the files initially. Thanks v much!