mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
add mssing environ variables
This commit is contained in:
parent
992b538705
commit
84d739f1e4
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user