This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree 3 files changed +31
-3
lines changed
app/code/Magento/Downloadable
Test/Unit/Controller/Download
lib/internal/Magento/Framework/HTTP
3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ protected function _processDownload($path, $resourceType)
64
64
$ contentDisposition = $ helper ->getContentDisposition ();
65
65
if (!$ contentDisposition || in_array ($ contentType , $ this ->disallowedContentTypes )) {
66
66
// For security reasons we force browsers to download the file instead of opening it.
67
- $ contentDisposition = \Zend_Mime ::DISPOSITION_ATTACHMENT ;
67
+ $ contentDisposition = \Magento \ Framework \ HTTP \Mime ::DISPOSITION_ATTACHMENT ;
68
68
}
69
69
70
70
$ response ->setHeader ('Content-Disposition ' , $ contentDisposition . '; filename= ' . $ fileName );
Original file line number Diff line number Diff line change @@ -492,8 +492,8 @@ public function linkNotAvailableDataProvider()
492
492
public function downloadTypesDataProvider ()
493
493
{
494
494
return [
495
- ['mimeType ' => 'text/html ' , 'disposition ' => \Zend_Mime ::DISPOSITION_ATTACHMENT ],
496
- ['mimeType ' => 'image/jpeg ' , 'disposition ' => \Zend_Mime ::DISPOSITION_INLINE ],
495
+ ['mimeType ' => 'text/html ' , 'disposition ' => \Magento \ Framework \ HTTP \Mime ::DISPOSITION_ATTACHMENT ],
496
+ ['mimeType ' => 'image/jpeg ' , 'disposition ' => \Magento \ Framework \ HTTP \Mime ::DISPOSITION_INLINE ],
497
497
];
498
498
}
499
499
}
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ namespace Magento \Framework \HTTP ;
8
+
9
+ /**
10
+ * Support class for MultiPart Mime Messages
11
+ */
12
+ class Mime
13
+ {
14
+ const TYPE_OCTETSTREAM = 'application/octet-stream ' ;
15
+ const TYPE_TEXT = 'text/plain ' ;
16
+ const TYPE_HTML = 'text/html ' ;
17
+ const ENCODING_7BIT = '7bit ' ;
18
+ const ENCODING_8BIT = '8bit ' ;
19
+ const ENCODING_QUOTEDPRINTABLE = 'quoted-printable ' ;
20
+ const ENCODING_BASE64 = 'base64 ' ;
21
+ const DISPOSITION_ATTACHMENT = 'attachment ' ;
22
+ const DISPOSITION_INLINE = 'inline ' ;
23
+ const LINELENGTH = 72 ;
24
+ const LINEEND = "\n" ;
25
+ const MULTIPART_ALTERNATIVE = 'multipart/alternative ' ;
26
+ const MULTIPART_MIXED = 'multipart/mixed ' ;
27
+ const MULTIPART_RELATED = 'multipart/related ' ;
28
+ }
You can’t perform that action at this time.
0 commit comments