cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Serving PDF's: set the content-length in the HTTP-Response-Header
Date Wed, 20 Mar 2002 13:39:23 GMT
Christoph Meier wrote:

> I think Phil is right about the bug in IE+Acrobat plug-in.
> IE+Acrobat plug-in stop dowloading the stream after a certain amount 
> of bytes is down.
> The problem should be fixed if you can set the content-length in the 
> HTTP-Response-Header, to tell IE+Acrobat plug-in about the size of the 
> Response-Stream.
> At least this worked when i was trying to serve PDFs from another 
> application-server. I never tried serving PDFs with a 
> Java-based-App-Server, yet, therefore i didn't tried that within 
> cocoon, ...
> but i'm quite sure it will work.
> the point is, i have no idea where to set this 
> HTTP-Response-Header-Property within cocoon.
> let me know it, if it worked.


The only solution for now is to extend the ResourceReader to make 
shouldSetContentLength() return true. However, this means that Cocoon 
will buffer internally the whole file before sending it down to the 
browser, which may not be what you want for large files.

A better long term solution would be for a Reader to be able to give the 
content-length (will add this to the todo list).

Note also that FOPSerializer returns true, meaning this problem doesn't 
exist for dynamically-generated PDF.


Sylvain Wallez
 Anyware Technologies                  Apache Cocoon 

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message