views:

926

answers:

3

We have a number of PDFs hosted using Lighttpd but when they are downloaded in IE (7.0.5730.13), the file download hangs at the end and does not complete. For example

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

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

This works fine in Firefox (3.0.5) both on OSX 10.5 and Windows XP but not on IE 7.

A screenshot of the hung download can be seen at http://www.mytton.net/so-pdf-q.png

This is not localised to one machine and has been replicated on other IE7 Windows PCs. The problem affects only the PDFs on the vouchercodes.co.uk site as other sites with PDFs work fine.

It has also been replicated with other versions of IE7/IE6 but not consistently.

A: 

The first one worked for me, but the second gave Acrobat error 109.

KB Q317640 might help (couldn't find it on the MS support site... they seem to have rearranged).

Greg
+2  A: 

I believe this is a progressive download issue of the acrobat plugin under IE.

Your lighttpd server is answering a HTTP/1.1 206 Partial Content which sometimes leads to a strange stalling of the downloading progress within the acrobat client

Some leads to workaround the issue :

  • Do not use the "Save As Optimised for Fast Web View" option when creating the pdf file
  • Uncheck the "Allow Background Download of Entire File" preferences of the Acrobat Reader
  • Disable byteserving capacity of the server (but this is obviously not recommended)
WiseTechi
Byteserving seems to be the issue. See my response at http://stackoverflow.com/questions/420295/why-do-some-pdfs-hang-when-downloading-in-ie-when-served-by-lighttpd#420526 and also http://redmine.lighttpd.net/issues/show/171#note-8
DavidM
+2  A: 

The problem is related to byteserving. See the Byteserving section of 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.

DavidM