summaryrefslogtreecommitdiffstats
path: root/Lib/CGIHTTPServer.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-01 03:27:34 (GMT)
committerGuido van Rossum <guido@python.org>2000-09-01 03:27:34 (GMT)
commit6aefd91c7f4f446dc6ea95ea00c62fc847ce886a (patch)
tree769eebeb457eb4455aefe403e3a3f5a1c352b7e4 /Lib/CGIHTTPServer.py
parent01fed4d4e6a2d5f4ff85236bb3430cdfef5e4ada (diff)
downloadcpython-6aefd91c7f4f446dc6ea95ea00c62fc847ce886a.zip
cpython-6aefd91c7f4f446dc6ea95ea00c62fc847ce886a.tar.gz
cpython-6aefd91c7f4f446dc6ea95ea00c62fc847ce886a.tar.bz2
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.
Diffstat (limited to 'Lib/CGIHTTPServer.py')
-rw-r--r--Lib/CGIHTTPServer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py
index fa30cbd..6a259a3 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.