From 84d739f1e4975cefd23403db5c3069fb010a7352 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Tue, 1 Dec 2009 14:29:40 +0100 Subject: [PATCH] add mssing environ variables --- gunicorn/httprequest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gunicorn/httprequest.py b/gunicorn/httprequest.py index 1c339d82..b11d5fe0 100644 --- a/gunicorn/httprequest.py +++ b/gunicorn/httprequest.py @@ -16,6 +16,7 @@ import re import StringIO +import sys from urllib import unquote from gunicorn import __version__ @@ -56,7 +57,6 @@ class HTTPRequest(object): query = "" length = self.body_length() - print length if not length: wsgi_input = StringIO.StringIO() elif length == "chunked": @@ -67,6 +67,8 @@ class HTTPRequest(object): environ = { "wsgi.url_scheme": 'http', + "wsgi.input": wsgi_input, + "wsgi.errors": sys.stderr, "wsgi.version": (1, 0), "wsgi.multithread": False, "wsgi.multiprocess": True, @@ -248,7 +250,7 @@ class InputFile(object): def next(self): if self.eof: - raise StopIteration + raise StopIteration() return self.readline()