2

我们有许多使用 Lighttpd 托管的 PDF,但是当它们在 IE (7.0.5730.13) 中下载时,文件下载在最后挂起并且没有完成。例如

http://static.vouchercodes.co.uk/printable/87-burger-king-voucher.pdf

http://static.vouchercodes.co.uk/printable/10-gbk.pdf

这在 OSX 10.5 和 Windows XP 上的 Firefox (3.0.5) 中都可以正常工作,但在 IE 7 上则不行。

可以在http://www.mytton.net/so-pdf-q.png看到挂起下载的截图

这没有本地化到一台机器上,并且已在其他 IE7 Windows PC 上复制。该问题仅影响 vuevocodes.co.uk 站点上的 PDF,因为其他具有 PDF 的站点可以正常工作。

它也被其他版本的 IE7/IE6 复制,但不一致。

4

2 回答 2

3

我相信这是IE下acrobat插件的渐进式下载问题。

您的 lighttpd 服务器正在回答 a HTTP/1.1 206 Partial Content,这有时会导致 acrobat 客户端中的下载进度出现奇怪的停止

一些导致解决该问题的方法:

  • 在创建 pdf 文件时不要使用“另存为优化的快速 Web 视图”选项
  • 取消选中 Acrobat Reader 的“允许后台下载整个文件”首选项
  • 禁用服务器的字节服务容量(但显然不推荐这样做)
于 2009-01-07T13:58:23.210 回答
2

该问题与字节服务有关。请参阅http://httpd.apache.org/docs/1.3/misc/known_client_problems.html的字节服务部分

The Adobe Acrobat Reader plugin makes extensive use of byteranges and prior to version 3.01 supports only the multipart/x-byterange response. Unfortunately there is no clue that it is the plugin making the request. If the plugin is used with Navigator, the above workaround works fine. But if the plugin is used with MSIE 3 (on Windows) the workaround won't work because MSIE 3 doesn't give the Range-Request clue that Navigator does. To workaround this, Apache special cases "MSIE 3" in the User-Agent and serves multipart/x-byteranges. Note that the necessity for this with MSIE 3 is actually due to the Acrobat plugin, not due to the browser.

This is also an issue in Lighttpd and is documented at http://redmine.lighttpd.net/issues/show/171 with a workaround (tested and works) at note 8.

于 2009-01-07T14:40:38.710 回答