comparison roundup/cgi_client.py @ 657:e0a1cc7538e9

more pychecker warnings removed
author Richard Jones <richard@users.sourceforge.net>
date Tue, 12 Mar 2002 22:52:26 +0000
parents c59bad997042
children cdcee6721841
comparison
equal deleted inserted replaced
656:eae9b69a0115 657:e0a1cc7538e9
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: cgi_client.py,v 1.111 2002-02-25 04:32:21 richard Exp $ 18 # $Id: cgi_client.py,v 1.112 2002-03-12 22:52:26 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 WWW request handler (also used in the stand-alone server). 21 WWW request handler (also used in the stand-alone server).
22 """ 22 """
23 23
24 import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes 24 import os, cgi, StringIO, urlparse, re, traceback, mimetypes
25 import binascii, Cookie, time, random 25 import binascii, Cookie, time, random
26 26
27 import roundupdb, htmltemplate, date, hyperdb, password 27 import roundupdb, htmltemplate, date, hyperdb, password
28 from roundup.i18n import _ 28 from roundup.i18n import _
29 29
72 self.debug = 0 72 self.debug = 0
73 73
74 def getuid(self): 74 def getuid(self):
75 return self.db.user.lookup(self.user) 75 return self.db.user.lookup(self.user)
76 76
77 def header(self, headers={'Content-Type':'text/html'}): 77 def header(self, headers=None):
78 '''Put up the appropriate header. 78 '''Put up the appropriate header.
79 ''' 79 '''
80 if headers is None:
81 headers = {'Content-Type':'text/html'}
80 if not headers.has_key('Content-Type'): 82 if not headers.has_key('Content-Type'):
81 headers['Content-Type'] = 'text/html' 83 headers['Content-Type'] = 'text/html'
82 self.request.send_response(200) 84 self.request.send_response(200)
83 for entry in headers.items(): 85 for entry in headers.items():
84 self.request.send_header(*entry) 86 self.request.send_header(*entry)
1323 props[key] = value 1325 props[key] = value
1324 return props 1326 return props
1325 1327
1326 # 1328 #
1327 # $Log: not supported by cvs2svn $ 1329 # $Log: not supported by cvs2svn $
1330 # Revision 1.111 2002/02/25 04:32:21 richard
1331 # ahem
1332 #
1328 # Revision 1.110 2002/02/21 07:19:08 richard 1333 # Revision 1.110 2002/02/21 07:19:08 richard
1329 # ... and label, width and height control for extra flavour! 1334 # ... and label, width and height control for extra flavour!
1330 # 1335 #
1331 # Revision 1.109 2002/02/21 07:08:19 richard 1336 # Revision 1.109 2002/02/21 07:08:19 richard
1332 # oops 1337 # oops

Roundup Issue Tracker: http://roundup-tracker.org/