Magento-从服务器接收到重复的标头

Magento-从服务器接收到重复的标头,magento,google-chrome,magento-1.5,export-to-csv,Magento,Google Chrome,Magento 1.5,Export To Csv,问题是,有时我在Google Chrome中过滤订单导出时会出现以下错误: Duplicate headers received from server The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator c

问题是,有时我在Google Chrome中过滤订单导出时会出现以下错误:

Duplicate headers received from server
The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.
我说的是
销售>订单
屏幕

假设我通过一个订单号对其进行过滤,这样我只想将一个实际订单导出到.csv文件

在FF、IE等方面,这似乎有效。大多数情况下,它也可以在Chrome上运行(本帖发布时的最新版本为16)

根据这篇文章:他能够推断出这与“s”作为测力计有关

我尝试去
lib/Varien/File/Csv.php
并将delimeter更改为“;”,但这似乎不起作用

有人有什么建议吗


注意:Chrome本身有一些修正(我想),但如果可能,我想通过Magento进行修正。

在这种情况下,Magento似乎没有正确发送标题

这不是“文件名中的逗号”错误,但它看起来像Magento发送相同的头两次

您可以通过在
app/code/core/Mage/core/Controller/Varien/Action.php
中更改3行来解决此问题。查看
\u preparedDownloadResponse
方法并更改以下内容:

$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'));

最好不要将此更改应用于核心类,而是创建该类的副本并将其放在此处:
/app/code/local/Mage/core/Controller/Varien/Action.php

类似于Magento 1.7下一版本中的此错误。

在Magento 1.4.2.0(可能在下面)中,此类的本地重写可能位于路径
app/code/local/Mage/Controller/Varien/Action.php
。尽管在
core/Mage/Adminhtml/Controller/Action.php
中进行了必要的更改,但我还是遇到了同样的问题。希望这对别人有帮助。
$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);