1616# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818#
19- # $Id: roundup.cgi,v 1.18 2001-11-06 22:10:11 jhermann Exp $
19+ # $Id: roundup.cgi,v 1.19 2001-11-22 00:25:10 richard Exp $
2020
2121# python version check
2222import sys
@@ -154,7 +154,7 @@ def main(out, err):
154154 request .send_response (200 )
155155 request .send_header ('Content-Type' , 'text/html' )
156156 request .end_headers ()
157- w = request .wfile . write
157+ w = request .write
158158 w ('<html><head><title>Roundup instances index</title></head>\n ' )
159159 w ('<body><h1>Roundup instances index</h1><ol>\n ' )
160160 homes = ROUNDUP_INSTANCE_HOMES .keys ()
@@ -170,6 +170,11 @@ def main(out, err):
170170#
171171out , err = sys .stdout , sys .stderr
172172try :
173+ # force input/output to binary (important for file up/downloads)
174+ if sys .platform == "win32" :
175+ import os , msvcrt
176+ msvcrt .setmode (sys .stdin .fileno (), os .O_BINARY )
177+ msvcrt .setmode (sys .stdout .fileno (), os .O_BINARY )
173178 checkconfig ()
174179 sys .stdout = sys .stderr = LOG
175180 main (out , err )
@@ -185,6 +190,9 @@ LOG.close()
185190
186191#
187192# $Log: not supported by cvs2svn $
193+ # Revision 1.18 2001/11/06 22:10:11 jhermann
194+ # Added env config; fixed request wrapper & index list; sort list by key
195+ #
188196# Revision 1.17 2001/11/06 21:51:19 richard
189197# Fixed HTTP headers for top-level index in CGI script
190198#
0 commit comments