IE receiving HTTP 1.0 response for some files

匆匆过客 提交于 2019-12-25 08:57:29

问题


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

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).

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>

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

Here are the send headers:

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

and the response headers:

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

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.


回答1:


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

http://blogs.msdn.com/b/ieinternals/archive/2011/03/26/https-and-connection-close-is-your-apache-modssl-server-configuration-set-to-slow.aspx



来源:https://stackoverflow.com/questions/11010153/ie-receiving-http-1-0-response-for-some-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!