[Python-checkins] CVS: python/dist/src/Lib CGIHTTPServer.py,1.18,1.19

Guido van Rossum gvanrossum@users.sourceforge.net
Tue, 16 Oct 2001 23:45:01 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv9671

Modified Files:
	CGIHTTPServer.py 
Log Message:
SF patch #467430.

- replace some log_error() calls with log_message()

- flush self.rfile before forking too (hope this works on Windows)


Index: CGIHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/CGIHTTPServer.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** CGIHTTPServer.py	2001/08/07 19:55:10	1.18
--- CGIHTTPServer.py	2001/10/17 06:44:58	1.19
***************
*** 193,196 ****
--- 193,197 ----
                  args.append(decoded_query)
              nobody = nobody_uid()
+             self.rfile.flush() # Always flush before forking
              self.wfile.flush() # Always flush before forking
              pid = os.fork()
***************
*** 227,231 ****
              if '=' not in query and '"' not in query:
                  cmdline = '%s "%s"' % (cmdline, query)
!             self.log_error("command: %s", cmdline)
              try:
                  nbytes = int(length)
--- 228,232 ----
              if '=' not in query and '"' not in query:
                  cmdline = '%s "%s"' % (cmdline, query)
!             self.log_message("command: %s", cmdline)
              try:
                  nbytes = int(length)
***************
*** 242,246 ****
                  self.log_error("CGI script exit status %#x", sts)
              else:
!                 self.log_error("CGI script exited OK")
  
          else:
--- 243,247 ----
                  self.log_error("CGI script exit status %#x", sts)
              else:
!                 self.log_message("CGI script exited OK")
  
          else:
***************
*** 267,271 ****
                  self.log_error("CGI script exit status %s", str(sts))
              else:
!                 self.log_error("CGI script exited OK")
  
  
--- 268,272 ----
                  self.log_error("CGI script exit status %s", str(sts))
              else:
!                 self.log_message("CGI script exited OK")