[TurboGears] Re: modifying cherrypy.response.headers

2006-11-03 Thread evan


Bob Ippolito wrote:

 cherrypy.response.headerMap['Cache-Control'] = 'max-age=120'

 -bob

Thanks Bob.  Works like a champ.

Only problem I have now is that while the csv file is properly cached
when I access the csv service directly but the csv file is not cached
when it is accessed from the embedded applet.  The applet uses the Java
URL class to establish the connection so I thought that the browser
would have a chance to examine and act on the header info.  Maybe
there's some specific set of header values I should add or maybe the
applet should use a different type of connection?  I know this is now
not a TurboGears issue but any clues for where I need to go from here
would be greatly appreciated.

Thanks,
Evan


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
TurboGears group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~--~~~~--~~--~--~---



[TurboGears] Re: modifying cherrypy.response.headers

2006-11-02 Thread Bob Ippolito

On 11/2/06, evan [EMAIL PROTECTED] wrote:

 Hi All,

 From previous posts it would appear that to modify the response headers
 all I should have to do is to import cherrypy and to set the
 cherrypy.response.headers dictionary.  But when I attempt to do that I
 get the following:

 cherrypy.response.headers['Cache-Control'] = 'max-age=120'
 TypeError: object does not support item assignment

cherrypy.response.headerMap['Cache-Control'] = 'max-age=120'

-bob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~--~~~~--~~--~--~---