]> granicus.if.org Git - python/commitdiff
SF patch #467430.
authorGuido van Rossum <guido@python.org>
Wed, 17 Oct 2001 06:45:56 +0000 (06:45 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 17 Oct 2001 06:45:56 +0000 (06:45 +0000)
- replace some log_error() calls with log_message()

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

Lib/CGIHTTPServer.py
Misc/ACKS

index 809cab73c8dc1d0dc9a28cc991d6788ac7375105..e8abd22c754507cf6459fa9cd6c6dcc334e027b1 100644 (file)
@@ -192,6 +192,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
             if '=' not in decoded_query:
                 args.append(decoded_query)
             nobody = nobody_uid()
+            self.rfile.flush() # Always flush before forking
             self.wfile.flush() # Always flush before forking
             pid = os.fork()
             if pid != 0:
@@ -226,7 +227,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
                 cmdline = "%s -u %s" % (interp, cmdline)
             if '=' not in query and '"' not in query:
                 cmdline = '%s "%s"' % (cmdline, query)
-            self.log_error("command: %s", cmdline)
+            self.log_message("command: %s", cmdline)
             try:
                 nbytes = int(length)
             except:
@@ -241,7 +242,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
             if sts:
                 self.log_error("CGI script exit status %#x", sts)
             else:
-                self.log_error("CGI script exited OK")
+                self.log_message("CGI script exited OK")
 
         else:
             # Other O.S. -- execute script in this process
@@ -266,7 +267,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
             except SystemExit, sts:
                 self.log_error("CGI script exit status %s", str(sts))
             else:
-                self.log_error("CGI script exited OK")
+                self.log_message("CGI script exited OK")
 
 
 nobody = None
index 074fa945cfe91c9693c595de1aa82f014348a3ca..0ae72c34d4e12e32f32867ddfca09aa9ba15aad1 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -301,6 +301,7 @@ Oscar Nierstrasz
 Hrvoje Niksic
 Bill Noon
 Stefan Norberg
+Joe Norton
 Neal Norwitz
 Jeffrey Ollie
 Nigel O'Brian