summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-04-01 17:08:55 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-04-01 17:08:55 -0400
commitb927d876e96d30d858f28887a558261e13d2f822 (patch)
tree34991e54e05f103fe2f7de23fa3767d654712edf /includes/file.inc
parent867ce3aa4d2c7b8521dd74298454756b958a78ba (diff)
downloadbrdo-b927d876e96d30d858f28887a558261e13d2f822.tar.gz
brdo-b927d876e96d30d858f28887a558261e13d2f822.tar.bz2
Issue #1229014 by bfroehle, jackbravo, illmasterc: Fixed Content-Disposition header makes private files show open/save prompts, but public files show inline.
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc10
1 files changed, 0 insertions, 10 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 09a442435..8389ab8a2 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -2481,20 +2481,10 @@ function file_directory_temp() {
function file_get_content_headers($file) {
$name = mime_header_encode($file->filename);
$type = mime_header_encode($file->filemime);
- // Serve images, text, and flash content for display rather than download.
- $inline_types = variable_get('file_inline_types', array('^text/', '^image/', 'flash$'));
- $disposition = 'attachment';
- foreach ($inline_types as $inline_type) {
- // Exclamation marks are used as delimiters to avoid escaping slashes.
- if (preg_match('!' . $inline_type . '!', $file->filemime)) {
- $disposition = 'inline';
- }
- }
return array(
'Content-Type' => $type,
'Content-Length' => $file->filesize,
- 'Content-Disposition' => $disposition . '; filename="' . $name . '"',
'Cache-Control' => 'private',
);
}