IE浏览器接收HTTP对于某些文件1.0回应 [英] IE receiving HTTP 1.0 response for some files

查看:188
本文介绍了IE浏览器接收HTTP对于某些文件1.0回应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经包括音频和在所有浏览器,除了IE工程的视频播放器(HTML5与Flash后备)。

I've included an audio and video player (html5 with flash fallback) which works in all browsers except IE.

在查找问题,我发现服务器发送HTTP / 1.0 200 OK和连接:关闭,但只有在IE浏览器,并只对某些文件(包括.swf文件头(没有内容长度) .MP3和.mp4)。

While looking for the problem I found that the server sends "HTTP/1.0 200 OK" and "Connection:close" headers (and no Content-Length), but only in IE and only for some files (including .swf, .mp3 and .mp4).

我已经加入以下为.htaccess禁用gzip的这些文件:

I have added the following to .htaccess to disable gzip for those files:

<IfModule mod_env.c>
  SetEnvIfNoCase Request_URI "\.(?:mp3|mp4)$" no-gzip dont-vary
</IfModule>

我有为什么不同的HTTP版本应该用于一些请求Apache的配置,不知道没有经验。

I have no experience with apache configurations and no idea why a different http version should be used for some requests.

下面是发送标题:

GET /test.mp3 HTTP/1.1
Accept  */*
User-Agent  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Accept-Encoding gzip, deflate
Host    ------
Connection  Keep-Alive

和响应头:

HTTP/1.0 200 OK
Date    Wed, 13 Jun 2012 07:38:17 GMT
Server  Apache/2.2.22 (Unix) mod_fcgid/2.3.6 mod_ssl/2.2.22 OpenSSL/0.9.8g
Last-Modified   Mon, 04 Jun 2012 13:15:25 GMT
ETag    "1bc12b-596969-4c1a553b51540"
Accept-Ranges   bytes
Connection  close
Content-Type    audio/mpeg

更新:我刚刚发现的初始页面请求(PHP,text / html的)响应也是HTTP / 1.0但不是所有后续Ajax请求

UPDATE: I just found out that the initial page request (PHP, text/html) response is also HTTP/1.0 but not all subsequent ajax requests.

推荐答案

的问题是与这是从来没有从默认配置中删除了Apache的老配置选项:

The problem was with an old configuration option in apache that was never removed from the default configuration:

<一个href=\"http://blogs.msdn.com/b/ieinternals/archive/2011/03/26/https-and-connection-close-is-your-apache-modssl-server-configuration-set-to-slow.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/ieinternals/archive/2011/03/26/https-and-connection-close-is-your-apache-modssl-server-configuration-set-to-slow.aspx

这篇关于IE浏览器接收HTTP对于某些文件1.0回应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆