Mercurial > p > roundup > code
comparison cgi-bin/roundup.cgi @ 3329:bd2e784f43aa
fix name collision in roundup.cgi script [SF#1203795]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 18 May 2005 05:39:21 +0000 |
| parents | 3084b07ec266 |
| children | 662cd78df973 |
comparison
equal
deleted
inserted
replaced
| 3328:475c8560ef9b | 3329:bd2e784f43aa |
|---|---|
| 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 # | 18 # |
| 19 # $Id: roundup.cgi,v 1.41 2005-04-13 05:30:06 richard Exp $ | 19 # $Id: roundup.cgi,v 1.42 2005-05-18 05:39:21 richard Exp $ |
| 20 | 20 |
| 21 # python version check | 21 # python version check |
| 22 from roundup import version_check | 22 from roundup import version_check |
| 23 from roundup.i18n import _ | 23 from roundup.i18n import _ |
| 24 import sys, time | 24 import sys, time |
| 157 request.end_headers() | 157 request.end_headers() |
| 158 out.write('Moved Permanently') | 158 out.write('Moved Permanently') |
| 159 else: | 159 else: |
| 160 tracker_home = TRACKER_HOMES[tracker] | 160 tracker_home = TRACKER_HOMES[tracker] |
| 161 tracker = roundup.instance.open(tracker_home) | 161 tracker = roundup.instance.open(tracker_home) |
| 162 from roundup.cgi import client | 162 import roundup.cgi.client |
| 163 if hasattr(tracker, 'Client'): | 163 if hasattr(tracker, 'Client'): |
| 164 client = tracker.Client(tracker, request, os.environ) | 164 client = tracker.Client(tracker, request, os.environ) |
| 165 else: | 165 else: |
| 166 client = client.Client(tracker, request, os.environ) | 166 client = roundup.cgi.client.Client(tracker, request, os.environ) |
| 167 try: | 167 try: |
| 168 client.main() | 168 client.main() |
| 169 except client.Unauthorised: | 169 except roundup.cgi.client.Unauthorised: |
| 170 request.send_response(403) | 170 request.send_response(403) |
| 171 request.send_header('Content-Type', 'text/html') | 171 request.send_header('Content-Type', 'text/html') |
| 172 request.end_headers() | 172 request.end_headers() |
| 173 out.write('Unauthorised') | 173 out.write('Unauthorised') |
| 174 except client.NotFound: | 174 except roundup.cgi.client.NotFound: |
| 175 request.send_response(404) | 175 request.send_response(404) |
| 176 request.send_header('Content-Type', 'text/html') | 176 request.send_header('Content-Type', 'text/html') |
| 177 request.end_headers() | 177 request.end_headers() |
| 178 out.write('Not found: %s'%client.path) | 178 out.write('Not found: %s'%client.path) |
| 179 | 179 |
