PDFs and other media documents using the "Download Link" display hesitate for anonymous users. I've confirmed that all the Download permissions are set correctly for anonymous users.

Here is a link to the issue on my site.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

museumboy created an issue. See original summary.

museumboy’s picture

Issue summary: View changes
joseph.olstad’s picture

This is a Duplicate issue, there is a workaround, search for open and closed media and or file_entity issues.

Please link the issue to this one when you find it.

museumboy’s picture

I see several issues where people are getting denied access to files but that is not my problem.

The file downloads quickly but stops at the last few kilobytes and won't always complete. This is the case even if the file is extremely small. It only happens using the Download Link option.

joseph.olstad’s picture

Category: Bug report » Support request

sounds like a web server or php setting issue.
what is your web server version and type?
apache , nginx, iis , xyz?
php version?
review your php.ini settings for the server
review your network configuration and hardware.

museumboy’s picture

nginx, varnish. PHP 5.5.14.

The admins say they haven't done any updates.

joseph.olstad’s picture

Status: Active » Needs review
FileSize
69.66 KB
97.23 KB

I downloaded and installed todays release of the media_dev distribution that has the latest media 7.x-2.13 release baked in , everything works.

sounds like a network issue or a server configuration issue on your side.
double check your php.ini settings for transfer timeout and max packet limits and upload limits and whatever timeout limits you can see.
Here's my php.ini (link , I renamed it to php.ini.txt from php.ini to bypass the upload filter on d.o)
(it works)
I tested on php 5.6.30-0+deb8u1

See screenshot, I downloaded a 6MB file , no problem.

can you try this using a web browser sitting on a computer inside your firewall , the closest possible to the server host network/subnet the better. if it works there, it's some firewall filtering thing.

What you should do is implement https , this will bypass packet sniffers that your network people have enabled (avoid false positives and lost packets by using https because the packet sniffers cannot decrypt the packets and thus cannot filter them) packet sniffing tools that network security people use far too often will mangle packets or drop them completely or break transmissions.

implement https and you'll most likely bypass most of your proxy / packet sniffing /network issues.

otherwise check your server settings,php settings (php.ini for nginx), web server settings (nginx) and/or varnish.

see screenshot
download link works in my media_dev environment.

joseph.olstad’s picture

also might be related to varnish
you might want to adjust your varnish settings , could be that the maximum varnish cache size exceeds the filesize. varnish might be trying to cache the request even though it might not be a good idea for it to cache downloads.

You could increase your varnish cache limits so that it can cache huge files.
this might also explain why this only affects anonymous users.

You could also implement some varnish rules to ignore the url pattern that corresponds to the download link.

joseph.olstad’s picture

Status: Needs review » Postponed (maintainer needs more info)
joseph.olstad’s picture

Suspect most likely conflicting varnish configuration in this case. Not a file_entity problem.

joseph.olstad’s picture

any luck with your varnish settings?