In hook_file_download(), the file name after the header Content-Disposition is not double quoted and thus the file name of files with spaces in the file name are truncated when using Firefox. This problem is only present when the file download type is set to private.
For further information on this problem in general, see one of these issues:
http://drupal.org/node/82614
http://drupal.org/node/23759
When this code was originally added to project.module (see http://drupal.org/node/119860), the double quotes were present in the patch attached to #16, but were lost with the patch attached to #21.
I'm not using private downloads, but was working on something where I copied the code from project_release_file_download() and ran into problems, so I assume that files handled by project_release.module when download method is private will be affected as well.
That fix is simple:
- 'Content-Disposition: attachment; filename='. mime_header_encode($filename),
+ 'Content-Disposition: attachment; filename="'. mime_header_encode($filename) .'"',
Comments
Comment #1
dwwYup, good catch. Tested and committed to both DRUPAL-4-7--2 and HEAD. Thanks!
However, testing this revealed critical bug with how we handle these initial release node file attachments when cvs.module isn't enabled. :( See http://drupal.org/node/185354 for a description and patch.
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.