Re: [Zope] HTTP compressed response

2005-12-15 Thread Dieter Maurer
Gabriel Genellina wrote at 2005-12-12 15:45 -0300:
 ...
 def enableHTTPCompression(self,REQUEST={},force=0,disable=0,query=0):
and I think I should invoke it with REQUEST=REQUEST to enable compression 
only when the client browser can handle it.
But I dont know WHEN to do the call - should it be in (every) template used 
to generate a response?

You must call the method on any RESPONSE you want compression to be enabled.

Usually, you put it in a generally used template or macro
(e.g. main_template or standard_html_header, respectively).

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] HTTP compressed response

2005-12-12 Thread Gabriel Genellina

Hello

I wish to enable HTTP response compression. Looking at 
ZPublisher\HTTPResponse.py I see this method:

def enableHTTPCompression(self,REQUEST={},force=0,disable=0,query=0):
and I think I should invoke it with REQUEST=REQUEST to enable compression 
only when the client browser can handle it.
But I dont know WHEN to do the call - should it be in (every) template used 
to generate a response? should I modify the response factory (make_response 
in ZServer\HTTPResponse.py) to invoke this? or what?



Gabriel Genellina
Softlab SRL 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )