I am using the filemager an attachment modules with Drupal 4.7, I use the private method and the attached PDF Files d’ont work in Firefox, however in IE 6/7 work fine.
I have tried these patchs but they don't resolve the problem:
1. http://drupal.org/node/93787
In the filemanager module at approx line 580, I have modified the headers,
'Content-Type: '. $file->mimetype .'; name='. $name,
'Content-Length: '. $file->size,
'Content-transfer-encoding: 8bit',
'Content-disposition: attachment; filename="'. $file->filename .'"',
'Expires: 0', 'Pragma: cache', 'Cache-Control: private
2. http://drupal.org/node/81123
I modified the file_transter function in file.inc, adding if ($header != '') before outputting headers:
foreach ($headers as $header) {
// To prevent HTTP header injection, we delete new lines that are
// not followed by a space or a tab.
// See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
$header = preg_replace('/\r?\n(?!\t| )/', '', $header);
if ($header != '') /* PATCH FB 28.8.06 */
header($header);
}
But only with Firefox, and Opera... IE works well!. Firefox with the PDF Download extension, work fine, but if you don’t install this extension d’ont work.