]> granicus.if.org Git - python/commitdiff
Now that StreamRequestHandler defaults rfile to buffered, make it
authorGuido van Rossum <guido@python.org>
Fri, 1 Sep 2000 03:27:34 +0000 (03:27 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 1 Sep 2000 03:27:34 +0000 (03:27 +0000)
unbuffered (by setting the class variable rbufsize to 0), because we
(may) need to pass the file descriptor to the subprocess running the
CGI script positioned after the headers.

Lib/CGIHTTPServer.py

index fa30cbdddae25c732b5c196ce4ac1592f947b2a4..6a259a32daafc67b08a014f52702307375c5a3df 100644 (file)
@@ -35,6 +35,10 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
 
     """
 
+    # Make rfile unbuffered -- we need to read one line and then pass
+    # the rest to a subprocess, so we can't use buffered input.
+    rbufsize = 0
+
     def do_POST(self):
         """Serve a POST request.