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]


Regards,


Jens Lorenz

-- 

jens.lorenz at interface-projects dot de

interface:projects GmbH                             \\|//
Tolkewitzer Strasse 49                              (o o)
01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~
Germany

Attachment: gzipserializer.zip
Description: Zip compressed data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to