[-] FO: Fix #PSCFV-9057 close output buffer before sending attachment and virtualproducts

This commit is contained in:
Rémi Gaillard
2013-05-14 18:13:07 +02:00
parent 2bcd5bd0c2
commit f33e8d8b4a
2 changed files with 6 additions and 1 deletions
@@ -32,6 +32,9 @@ class AttachmentControllerCore extends FrontController
if (!$a->id)
Tools::redirect('index.php');
if (ob_get_level())
ob_end_clean();
header('Content-Transfer-Encoding: binary');
header('Content-Type: '.$a->mime);
header('Content-Length: '.filesize(_PS_DOWNLOAD_DIR_.$a->file));