2

如果我直接访问我的页面,我会得到:

$ wget http://localhost:8010/ --save-headers -O -
--2010-10-29 18:30:24--  http://localhost:8010/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8010... connected.
HTTP request sent, awaiting response... 200 OK
Length: 950 [text/html]
Saving to: `STDOUT'
HTTP/1.1 200 OK
Server: gunicorn/0.11.1
Date: Fri, 29 Oct 2010 16:30:24 GMT
Connection: keep-alive
Vary: Accept-Language, Cookie, Accept-Encoding
Content-Length: 950
Content-Type: text/html; charset=utf-8
Content-Language: en-us

如果我通过缓存访问它:

$ wget http://localhost:8000/ --save-headers -O -
--2010-10-29 18:30:31--  http://localhost:8000/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 950 [text/html]
Saving to: `STDOUT'
HTTP/1.1 200 OK
Server: gunicorn/0.11.1
Vary: Accept-Language, Cookie, Accept-Encoding
Content-Type: text/html; charset=utf-8
Content-Language: en-us
Content-Length: 950
Date: Fri, 29 Oct 2010 16:30:31 GMT
X-Varnish: 818233557
Age: 0
Via: 1.1 varnish
Connection: keep-alive

当我在 Chromium (8.0.552.18 (0)) 中打开后者时,我收到此错误:

Error 346 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH): Unknown error.

我只看到三个额外的标题;我应该删除哪个以使其在 Chrome 中显示?

编辑:我最终摆脱了这个问题,但我不记得如何了,我也无法再访问那个系统了。我正在开始赏金,也许有人会向我解释这里发生了什么。

4

2 回答 2

2

查看这个版本的铬源。看起来如果您不指定“Transfer-Encoding”并且包含多个长度,它将引发这个错误。后来的修订版添加了一项检查,即内容长度大小必须不同才能引发此错误。似乎它是作为安全预防措施添加的。

使用较新版本的 Chromium 可能永远不会看到此错误。

于 2011-01-19T16:59:19.453 回答
-1

您可以尝试在 Chromium 设置中禁用 DNS 预取。转到“首选项”>“幕后”并取消选中“使用 DNS 预取来改善页面加载时间”。

于 2011-01-17T20:37:41.543 回答