Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.py @ 2270:3cdefcb2b7d2 maint-0.7
have roundup server pass though the cause of a "403 Forbidden" response
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 09 May 2004 23:41:13 +0000 |
| parents | ca2664e095be |
| children | 105a4079b98f |
comparison
equal
deleted
inserted
replaced
| 2269:bb152a04bee7 | 2270:3cdefcb2b7d2 |
|---|---|
| 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.46 2004-04-20 21:57:16 richard Exp $ | 20 $Id: roundup_server.py,v 1.46.2.1 2004-05-09 23:41:13 richard Exp $ |
| 21 """ | 21 """ |
| 22 __docformat__ = 'restructuredtext' | 22 __docformat__ = 'restructuredtext' |
| 23 | 23 |
| 24 # python version check | 24 # python version check |
| 25 from roundup import version_check | 25 from roundup import version_check |
| 92 sys.stdin = self.rfile | 92 sys.stdin = self.rfile |
| 93 try: | 93 try: |
| 94 self.inner_run_cgi() | 94 self.inner_run_cgi() |
| 95 except client.NotFound: | 95 except client.NotFound: |
| 96 self.send_error(404, self.path) | 96 self.send_error(404, self.path) |
| 97 except client.Unauthorised: | 97 except client.Unauthorised, message: |
| 98 self.send_error(403, self.path) | 98 self.send_error(403, '%s (%s)'%(self.path, message)) |
| 99 except: | 99 except: |
| 100 exc, val, tb = sys.exc_info() | 100 exc, val, tb = sys.exc_info() |
| 101 if hasattr(socket, 'timeout') and isinstance(val, socket.timeout): | 101 if hasattr(socket, 'timeout') and isinstance(val, socket.timeout): |
| 102 self.log_error('timeout') | 102 self.log_error('timeout') |
| 103 else: | 103 else: |
