Tuesday, March 13, 2012

Magento Export Sales Order Duplicate headers received from server

Its a bug which have been fixed in magento 1.7.
But for 1.6.2 users, you may change the core to fix this in:
app/code/core/Mage/Core/Controller/Varien/Action.php in function _prepareDownloadResponse:

By adding , true as the 3rd parameter in these lines:
->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength, true)
 ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true)
 ->setHeader('Last-Modified', date('r'), true);

2 comments:

Anonymous said...

its works
rahul singla from vardhmansoft

Thanks

Stuart Laverick said...

Worked for me, trying to download Table Rates CSV on Magento 1.6.2.0
Thanks
Stuart