It seems that magento did not send the headers correctly in this case.
This is not a “comma in file name” error, but Magento seems to send the same header twice.
You can fix this problem by changing 3 lines in app/code/core/Mage/Core/Controller/Varien/Action.php . Take a look at the _prepareDownloadResponse method and change the following:
$this->getResponse() ->setHttpResponseCode(200) ->setHeader('Pragma', 'public', true) ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true) ->setHeader('Content-type', $contentType, true) ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength) ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"') ->setHeader('Last-Modified', date('r'));
by
$this->getResponse() ->setHttpResponseCode(200) ->setHeader('Pragma', 'public', true) ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true) ->setHeader('Content-type', $contentType, true) ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength, true) ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true) ->setHeader('Last-Modified', date('r'), true);
It’s best not to apply this change to the main classes, but create a copy of this class and place it here: /app/code/local/Mage/core/Controller/Varien/Action.php .
It seems that this error will be fixed in the next version of Magento 1.7.