[jToolkit-cvs] jToolkit/web server.py,1.5,1.6
Brought to you by:
davidfraser,
friedelwolff
From: <dav...@us...> - 2003-10-14 09:36:56
|
Update of /cvsroot/jtoolkit/jToolkit/web In directory sc8-pr-cvs1:/tmp/cvs-serv30126 Modified Files: server.py Log Message: added caching control also changed logic in argument parsing: was skipping StringFields if they were in multiple-argument lists... Index: server.py =================================================================== RCS file: /cvsroot/jtoolkit/jToolkit/web/server.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** server.py 29 Sep 2003 08:01:38 -0000 1.5 --- server.py 14 Oct 2003 09:36:49 -0000 1.6 *************** *** 194,197 **** --- 194,201 ---- def sendpage(self, req, thepage): """returns the page to the user""" + # disallow caching unless the user explicitly overrides this (per-server or per-page) + if not (getattr(self, 'allowcaching', 0) or getattr(thepage, 'allowcaching', 0)): + req.headers_out.add('Cache-Control', 'no-cache') + req.headers_out.add('Pragma', 'no-cache') if isinstance(thepage, widgets.Widget): # get the content type... *************** *** 231,235 **** # this only happens with multiple arguments, which we don't want value = value[0] ! elif hasattr(value, 'value'): # this is for a StringField from mod_python 3... value = value.value --- 235,239 ---- # this only happens with multiple arguments, which we don't want value = value[0] ! if hasattr(value, 'value'): # this is for a StringField from mod_python 3... value = value.value |