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.
This commit is contained in:
Guido van Rossum 2000-09-01 03:27:34 +00:00
parent 01fed4d4e6
commit 6aefd91c7f
1 changed files with 4 additions and 0 deletions

View 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.