Mantis - Resin
Viewing Issue Advanced Details
235 minor always 06-06-05 00:00 11-30-05 14:43
user223  
 
urgent  
closed  
fixed  
none    
none 3.0.14  
0000235: download of PDF documents with errors
RSN-258
When using Apache 2.0.52 and Resin 3.0.8 (mod_caucho) we can't download PDF documents properly. The documents seem to be truncated or mutilated.

The Acrobat Reader plugin in the browser shows an error message like "File does not start with %PDF-" or "The file is damaged and can't be repaired" or "A problem occured while reading the document".

This problem seems to be independent from the version of Acrobat Reader / Adobe Acrobat that is installed on the local computer.

The documents on the server are valid PDF documents. When looking at the documents with PuTTy we can see that they start with "%PDF-". When we download documents directly via FTP the documents are not truncated.

When we put the documents in the Apache webspace and download the documents directly from the Apache, there are not any errors. When we download the documents directly from the Resin webspace (by using the Resin port), there are not any errors. The errors only occur when mod_caucho is active (the standard port is used).

The error does not occur every time. Sometimes a document is damaged. Next time the same document is ok.

The errors only occur when using Internet Explorer on the local computer (i.e. IE 6.0 SP1 or IE 5.0 SP3). When using Netscape (i.e. version 7) or Mozilla Firefox, everything is fine.

When using Apache 1.3.29 or 1.3.33 with Resin 3.0.8 these errors don't occur.

It seems to be a problem with mod_caucho (Apache 2.x and Resin 3.x) on the server and the Internet Explorer on the local computer.
Apache 2.0.52 with Resin 3.0.8

Notes
(0000270)
user169   
06-06-05 00:00   
we had quite same problems with resin 2 and iis 5,6 and with apache 2
but afaik this problem is related with range requests that acrobat reader does...
we have lots of problems and we sloved them by leting iis serve them.. but this is not conviniant way.
becouse you cannot apply all the security filters on servlet side but on iis.. which is not so ql and it complicates stuff
(0000271)
user170   
06-06-05 00:00   
On a sidenote, Acrobat reader does not support compressed GZIP streams (even if the browser sends the "Accept-encoding: gzip" header). See if you by any chance are compressing your PDF files before serving them to the client.
(0000272)
user223   
06-06-05 00:00   
With Apache 1.x and Resin 2.x we did not have any problems with PDF files.
Maybe it's a general problem with Apache 2.x and Resin?

I think we haven't configured anything to compress our PDF files. But how can I check that?
(0000273)
ferg   
06-06-05 00:00   
This is already fixed in the 3.0.14 snapshot.
(0000274)
user223   
06-06-05 00:00   
When will the 3.0.14 snapshot be released?