summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90329de)
raw | patch | inline | side by side (parent: 90329de)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 26 Mar 2003 03:35:00 +0000 (03:35 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 26 Mar 2003 03:35:00 +0000 (03:35 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1624 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/client.py | patch | blob | history |
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 76dc92746b03efd82adba6b9b064765fac47a97d..86c1c83a3af78ef7d1ce05f36e911933688c34a8 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.109 2003-03-20 04:02:52 richard Exp $
+# $Id: client.py,v 1.110 2003-03-26 03:35:00 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
# we don't want clients caching our dynamic pages
self.additional_headers['Cache-Control'] = 'no-cache'
self.additional_headers['Pragma'] = 'no-cache'
- self.additional_headers['Expires'] = 'Thu, 1 Jan 1970 00:00:00 GMT'
+
+ # expire this page 5 seconds from now
+ date = rfc822.formatdate(time.time() + 5)
+ self.additional_headers['Expires'] = date
# render the content
self.write(self.renderContext())
raise NotModified
# we just want to serve up the file named
- mt = mimetypes.guess_type(str(file))[0]
+ file = str(file)
+ mt = mimetypes.guess_type(file)[0]
if not mt:
- mt = 'text/plain'
+ if file.endswith('.css'):
+ mt = 'text/css'
+ else:
+ mt = 'text/plain'
self.additional_headers['Content-Type'] = mt
self.additional_headers['Last-Modifed'] = rfc822.formatdate(lmt)
self.write(open(filename, 'rb').read())
# pull the rego information out of the otk database
otk = self.form['otk'].value
uid = self.db.otks.get(otk, 'uid')
+ if uid is None:
+ self.error_message.append('Invalid One Time Key!')
+ return
# re-open the database as "admin"
if self.user != 'admin':
else:
continue
else:
- if not self.form[key].value: continue
+ if not self.form[key].value:
+ continue
self.form.value.append(cgi.MiniFieldStorage('@filter', key))
# handle saving the query params