Mercurial > p > roundup > code
comparison roundup-server @ 336:b3c103e536ed
Fix to CGI top-level index (thanks Juergen Hermann)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 29 Oct 2001 23:55:44 +0000 |
| parents | 96212178c175 |
| children | ab16997d9cda |
comparison
equal
deleted
inserted
replaced
| 335:45113e2e72cd | 336:b3c103e536ed |
|---|---|
| 18 # | 18 # |
| 19 """ HTTP Server that serves roundup. | 19 """ HTTP Server that serves roundup. |
| 20 | 20 |
| 21 Based on CGIHTTPServer in the Python library. | 21 Based on CGIHTTPServer in the Python library. |
| 22 | 22 |
| 23 $Id: roundup-server,v 1.16 2001-10-27 00:12:21 richard Exp $ | 23 $Id: roundup-server,v 1.17 2001-10-29 23:55:44 richard Exp $ |
| 24 | 24 |
| 25 """ | 25 """ |
| 26 import sys | 26 import sys |
| 27 if int(sys.version[0]) < 2: | 27 if int(sys.version[0]) < 2: |
| 28 print "Content-Type: text/plain\n" | 28 print "Content-Type: text/plain\n" |
| 107 w("Content-Type: text/html\n\n") | 107 w("Content-Type: text/html\n\n") |
| 108 w('<html><head><title>Roundup instances index</title><head>\n') | 108 w('<html><head><title>Roundup instances index</title><head>\n') |
| 109 w('<body><h1>Roundup instances index</h1><ol>\n') | 109 w('<body><h1>Roundup instances index</h1><ol>\n') |
| 110 for instance in self.ROUNDUP_INSTANCE_HOMES.keys(): | 110 for instance in self.ROUNDUP_INSTANCE_HOMES.keys(): |
| 111 w('<li><a href="%s/index">%s</a>\n'%(urllib.quote(instance), | 111 w('<li><a href="%s/index">%s</a>\n'%(urllib.quote(instance), |
| 112 instance)) | 112 cgi.escape(instance))) |
| 113 w('</ol></body></html>') | 113 w('</ol></body></html>') |
| 114 | 114 |
| 115 def inner_run_cgi(self): | 115 def inner_run_cgi(self): |
| 116 ''' This is the inner part of the CGI handling | 116 ''' This is the inner part of the CGI handling |
| 117 ''' | 117 ''' |
| 259 if __name__ == '__main__': | 259 if __name__ == '__main__': |
| 260 main() | 260 main() |
| 261 | 261 |
| 262 # | 262 # |
| 263 # $Log: not supported by cvs2svn $ | 263 # $Log: not supported by cvs2svn $ |
| 264 # Revision 1.16 2001/10/27 00:12:21 richard | |
| 265 # Fixed roundup-server for windows, thanks Juergen Hermann. | |
| 266 # | |
| 264 # Revision 1.15 2001/10/12 02:23:26 richard | 267 # Revision 1.15 2001/10/12 02:23:26 richard |
| 265 # Didn't clean up after myself :) | 268 # Didn't clean up after myself :) |
| 266 # | 269 # |
| 267 # Revision 1.14 2001/10/12 02:20:32 richard | 270 # Revision 1.14 2001/10/12 02:20:32 richard |
| 268 # server now handles setuid'ing much better | 271 # server now handles setuid'ing much better |
