Jens Lorenz wrote: > > Hi, > > since the issue has been raised on cocoon-users I've been > hacking on serializers which automatically gzip compress > the (cocoon) produced html before it is send to the browser > on the client side. > BTW: this should also reduce the size of the cache dir since > the stored html is compressed. > Since I've no more clues on this but it's not ready for the > patch queue either I'm sending this to cocoon-dev, hoping > someone else might give it a try. > > Anyway. What I've done is taking HTMLSerializer and creating > an GZIPOutputStream before the outputstream is handed over > to the XSL TransformerHandler. > > There are still two major issues with this however. > > The GZIPSerializer needs to set the Content-encoding header > of the response. But Serializers have no setup() function > like generators or transformers (see SitemapModelComponent > interface) and so they don't get the environment. > > My solution for this is to implement SitemapModelComponent > interface anyway and let AbstractProcessingPipeline test > if the used serializer implements this interface and call > the setup function then. > > Second major issue is that this serializer only works sometimes. > For example the welcome page works as well as the examples page, > but none of the documentation page works. They simply produce > an invalid gzip format but I'm unable to find out why. > (somehow the trailer is not send) > > [the diff's / files are attached to this mail]
[note: didn't look at your code] Question: why isn't a GZIPServletFilter enough for what you want? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. <[EMAIL PROTECTED]> Friedrich Nietzsche -------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]