summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rothstein2012-09-15 21:47:36 (GMT)
committer David Rothstein2012-09-15 21:47:36 (GMT)
commite218effd9d7d01cf1e5e22b7b1ea367084b7a821 (patch)
tree083621461aa1682a56ddfa77c85e7af2cf68de56
parent4d392996a29b5e650018d403684333884530b9c6 (diff)
Issue #1773032 by Jorrit: Fixed Non-standard and pointless name attribute added to Content-Type header.
-rw-r--r--includes/file.inc2
-rw-r--r--modules/image/image.test2
2 files changed, 2 insertions, 2 deletions
diff --git a/includes/file.inc b/includes/file.inc
index c5e5cf0..971a019 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -2489,7 +2489,7 @@ function file_get_content_headers($file) {
}
return array(
- 'Content-Type' => $type . '; name="' . $name . '"',
+ '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 6a5d20f..2a35599 100644
--- a/modules/image/image.test
+++ b/modules/image/image.test
@@ -748,7 +748,7 @@ class ImageFieldDisplayTestCase extends ImageFieldTestCase {
if ($scheme == 'private') {
// Only verify HTTP headers when using private scheme and the headers are
// sent by Drupal.
- $this->assertEqual($this->drupalGetHeader('Content-Type'), 'image/png; name="' . $test_image->filename . '"', t('Content-Type header was sent.'));
+ $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.'));