我在 github 和 bitbucket 上有一个奇怪的问题。Chrome 偶尔会下载一个页面而不是显示它。如果我取消下载并再次单击,它可以工作。我有一种预感,可能是因为内容类型是 application/x-gzip... 有没有人有类似的经历或解决方案?提前致谢!
[编辑]: @genkev:响应 mimetype 是 application/x-gzip。我不知道为什么它以这种方式发送,或者为什么它没有定期显示但要求浏览器下载文件。我不会说它既不是浏览器问题也不是服务器问题,但无论如何它都是(我的)问题。
{
"startedDateTime": "2012-11-29T08:27:08.503Z",
"time": 3,
"request": {
"method": "GET",
"url": "https://github.com/LearnBoost/socket.io/wiki",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Accept-Language",
"value": "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
},
{
"name": "Cookie",
"value": "uninteresting cookie"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
},
{
"name": "Host",
"value": "github.com"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
},
{
"name": "Referer",
"value": "https://github.com/LearnBoost/socket.io/issues"
}
],
"queryString": [],
"cookies": [
"some cookies"
],
"headersSize": 1678,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/0.9",
"headers": [],
"cookies": [],
"content": {
"size": 0,
"mimeType": "application/x-gzip",
"compression": 0
},
"redirectURL": "",
"headersSize": 19,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0,
"receive": 1,
"ssl": -1
},
"pageref": "page_2"
}