summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-01 03:27:34 +0000
committerGuido van Rossum <guido@python.org>2000-09-01 03:27:34 +0000
commit6aefd91c7f4f446dc6ea95ea00c62fc847ce886a (patch)
tree769eebeb457eb4455aefe403e3a3f5a1c352b7e4
parent01fed4d4e6a2d5f4ff85236bb3430cdfef5e4ada (diff)
downloadcpython-git-6aefd91c7f4f446dc6ea95ea00c62fc847ce886a.tar.gz
Now that StreamRequestHandler defaults rfile to buffered, make it
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.
-rw-r--r--Lib/CGIHTTPServer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py
index fa30cbddda..6a259a32da 100644
--- a/Lib/CGIHTTPServer.py
+++ b/Lib/CGIHTTPServer.py
@@ -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.