正在IE9中恢复HTTP下载



我真的很难在IE 9中恢复下载过程。在其他浏览器和下载管理器中一切都很好。我知道恢复下载所需的标题,但IE不会在我尝试恢复下载后发送它们。HTTP标头日志:请求文件:

======================= Request ===========================
Connection=Keep-Alive
Accept=*/*
Accept-Encoding=gzip, deflate
Host=localhost
User-Agent=Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
======================= Response ===========================
Status code 200
Server=Microsoft-IIS/7.5
X-AspNetMvc-Version=3.0
Last-Modified=Thu, 07 Jun 2012 14:31:35 GMT
ETag="BCZFgJdhKko3IfS9D4nojw=="
Accept-Ranges=bytes
Expires=Sat, 10 Oct 2020 07:10:10 GMT
Content-Length=4048784811
Content-Disposition=attachment; filename=DEM_AK_Bristol Bay.zip
Cache-Control=private
X-AspNet-Version=4.0.30319
Content-Type=application/zip

下面是恢复的日志:

======================= Request ===========================
Connection=Keep-Alive
Accept=*/*
Accept-Encoding=gzip, deflate
Host=localhost
User-Agent=Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
======================= Response ===========================
Status code 200
Server=Microsoft-IIS/7.5
X-AspNetMvc-Version=3.0
Last-Modified=Thu, 07 Jun 2012 14:31:35 GMT
ETag="BCZFgJdhKko3IfS9D4nojw=="
Accept-Ranges=bytes
Expires=Sat, 10 Oct 2020 07:10:10 GMT
Content-Length=4048784811
Content-Disposition=attachment; filename=DEM_AK_Bristol Bay.zip
Cache-Control=private
X-AspNet-Version=4.0.30319
Content-Type=application/zip

正如您所看到的,它们是完全相同的。下面是firefox的日志:第一个请求:

======================= Request ===========================
Connection=keep-alive
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding=gzip, deflate
Accept-Language=ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
ASP.NET_SessionId=zv0ro2lhiumuijipzuamuemg
Host=localhost
User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
======================= Response ===========================
Status code 200
Server=Microsoft-IIS/7.5
X-AspNetMvc-Version=3.0
Last-Modified=Thu, 07 Jun 2012 14:31:35 GMT
ETag="BCZFgJdhKko3IfS9D4nojw=="
Accept-Ranges=bytes
Expires=Sat, 10 Oct 2020 07:10:10 GMT
Content-Length=4048784811
Content-Disposition=attachment; filename=DEM_AK_Bristol Bay.zip
Cache-Control=private
X-AspNet-Version=4.0.30319
Content-Type=application/zip

并恢复下载

======================= Request ===========================
Connection=keep-alive
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding=gzip, deflate
Accept-Language=ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
ASP.NET_SessionId=zv0ro2lhiumuijipzuamuemg
Host=localhost
<b>If-Match="BCZFgJdhKko3IfS9D4nojw=="
If-Unmodified-Since=Thu, 07 Jun 2012 14:31:35 GMT
Range=bytes=526057028-</b>
User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
======================= Response ===========================
Status code 206
Server=Microsoft-IIS/7.5
X-AspNetMvc-Version=3.0
Last-Modified=Thu, 07 Jun 2012 14:31:35 GMT
ETag="BCZFgJdhKko3IfS9D4nojw=="
Accept-Ranges=bytes
Expires=-1
Content-Length=3522727783
Content-Range=bytes 526057028-4048784810/4048784811
Cache-Control=no-cache
X-AspNet-Version=4.0.30319
Content-Type=application/zip
Pragma=no-cache

有人知道是什么导致了这个问题吗?谢谢

我发现这个解决方案非常简单。缓存设置是我的应用程序使"世界上最好的浏览器"认为该文件从一开始就被修改并重新下载。这是非常奇怪的行为,因为其他浏览器和下载管理器都很好。

相关内容

  • 没有找到相关文章

最新更新