cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
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.

<snip/>

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

-- 
Sylvain Wallez
 Anyware Technologies                  Apache Cocoon
 http://www.anyware-tech.com           mailto:sylvain@apache.org




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message