add mssing environ variables

This commit is contained in:
Benoit Chesneau 2009-12-01 14:29:40 +01:00
parent 992b538705
commit 84d739f1e4

View File

@ -16,6 +16,7 @@
import re import re
import StringIO import StringIO
import sys
from urllib import unquote from urllib import unquote
from gunicorn import __version__ from gunicorn import __version__
@ -56,7 +57,6 @@ class HTTPRequest(object):
query = "" query = ""
length = self.body_length() length = self.body_length()
print length
if not length: if not length:
wsgi_input = StringIO.StringIO() wsgi_input = StringIO.StringIO()
elif length == "chunked": elif length == "chunked":
@ -67,6 +67,8 @@ class HTTPRequest(object):
environ = { environ = {
"wsgi.url_scheme": 'http', "wsgi.url_scheme": 'http',
"wsgi.input": wsgi_input,
"wsgi.errors": sys.stderr,
"wsgi.version": (1, 0), "wsgi.version": (1, 0),
"wsgi.multithread": False, "wsgi.multithread": False,
"wsgi.multiprocess": True, "wsgi.multiprocess": True,
@ -248,7 +250,7 @@ class InputFile(object):
def next(self): def next(self):
if self.eof: if self.eof:
raise StopIteration raise StopIteration()
return self.readline() return self.readline()