diff --git a/includes/file.inc b/includes/file.inc index 1e256c6..23cb911 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -2478,20 +2478,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', ); } diff --git a/modules/image/image.test b/modules/image/image.test index 1ca8465..c4bf93a 100644 --- a/modules/image/image.test +++ b/modules/image/image.test @@ -749,7 +749,6 @@ class ImageFieldDisplayTestCase extends ImageFieldTestCase { // Only verify HTTP headers when using private scheme and the headers are // sent by Drupal. $this->assertEqual($this->drupalGetHeader('Content-Type'), 'image/png', t('Content-Type header was sent.')); - $this->assertEqual($this->drupalGetHeader('Content-Disposition'), 'inline; filename="' . $test_image->filename . '"', t('Content-Disposition header was sent.')); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'private', t('Cache-Control header was sent.')); // Log out and try to access the file.