Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.py @ 3736:a2d22d0de0bc
WSGI support via roundup.cgi.wsgi_handler
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 09 Nov 2006 00:36:21 +0000 |
| parents | 2addec69757a |
| children | 93dfda74a763 |
comparison
equal
deleted
inserted
replaced
| 3735:e8d4ac23692f | 3736:a2d22d0de0bc |
|---|---|
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 16 # | 16 # |
| 17 | 17 |
| 18 """Command-line script that runs a server over roundup.cgi.client. | 18 """Command-line script that runs a server over roundup.cgi.client. |
| 19 | 19 |
| 20 $Id: roundup_server.py,v 1.84 2006-10-29 05:01:15 a1s Exp $ | 20 $Id: roundup_server.py,v 1.85 2006-11-09 00:36:21 richard Exp $ |
| 21 """ | 21 """ |
| 22 __docformat__ = 'restructuredtext' | 22 __docformat__ = 'restructuredtext' |
| 23 | 23 |
| 24 import errno, cgi, getopt, os, socket, sys, traceback, urllib, time | 24 import errno, cgi, getopt, os, socket, sys, traceback, urllib, time |
| 25 import ConfigParser, BaseHTTPServer, SocketServer, StringIO | 25 import ConfigParser, BaseHTTPServer, SocketServer, StringIO |
| 280 format, *args) | 280 format, *args) |
| 281 except IOError: | 281 except IOError: |
| 282 # stderr is no longer viable | 282 # stderr is no longer viable |
| 283 pass | 283 pass |
| 284 | 284 |
| 285 def start_response(self, headers, response): | |
| 286 self.send_response(response) | |
| 287 for key, value in headers: | |
| 288 self.send_header(key, value) | |
| 289 self.end_headers() | |
| 290 | |
| 285 def error(): | 291 def error(): |
| 286 exc_type, exc_value = sys.exc_info()[:2] | 292 exc_type, exc_value = sys.exc_info()[:2] |
| 287 return _('Error: %s: %s' % (exc_type, exc_value)) | 293 return _('Error: %s: %s' % (exc_type, exc_value)) |
| 288 | 294 |
| 289 def setgid(group): | 295 def setgid(group): |
