mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Revert "fix wsgi.input_terminated"
This reverts commit 265e58f9e82f64e003015fb25823f5a983be8c27.
This commit is contained in:
parent
e150ca4ff8
commit
0d8a022791
@ -33,7 +33,6 @@ class Message(object):
|
|||||||
self.version = None
|
self.version = None
|
||||||
self.headers = []
|
self.headers = []
|
||||||
self.trailers = []
|
self.trailers = []
|
||||||
self.terminated = True
|
|
||||||
self.body = None
|
self.body = None
|
||||||
self.scheme = "https" if cfg.is_ssl else "http"
|
self.scheme = "https" if cfg.is_ssl else "http"
|
||||||
|
|
||||||
@ -152,7 +151,6 @@ class Message(object):
|
|||||||
if content_length < 0:
|
if content_length < 0:
|
||||||
raise InvalidHeader("CONTENT-LENGTH", req=self)
|
raise InvalidHeader("CONTENT-LENGTH", req=self)
|
||||||
|
|
||||||
self.terminated = False
|
|
||||||
self.body = Body(LengthReader(self.unreader, content_length))
|
self.body = Body(LengthReader(self.unreader, content_length))
|
||||||
else:
|
else:
|
||||||
self.body = Body(EOFReader(self.unreader))
|
self.body = Body(EOFReader(self.unreader))
|
||||||
|
|||||||
@ -82,7 +82,6 @@ def default_environ(req, sock, cfg):
|
|||||||
env = base_environ(cfg)
|
env = base_environ(cfg)
|
||||||
env.update({
|
env.update({
|
||||||
"wsgi.input": req.body,
|
"wsgi.input": req.body,
|
||||||
"wsgi.input_terminated": req.terminated,
|
|
||||||
"gunicorn.socket": sock,
|
"gunicorn.socket": sock,
|
||||||
"REQUEST_METHOD": req.method,
|
"REQUEST_METHOD": req.method,
|
||||||
"QUERY_STRING": req.query,
|
"QUERY_STRING": req.query,
|
||||||
@ -132,6 +131,7 @@ def create(req, sock, client, server, cfg):
|
|||||||
continue
|
continue
|
||||||
elif hdr_name == "CONTENT-LENGTH":
|
elif hdr_name == "CONTENT-LENGTH":
|
||||||
environ['CONTENT_LENGTH'] = hdr_value
|
environ['CONTENT_LENGTH'] = hdr_value
|
||||||
|
environ['wsgi.input_terminated'] = False
|
||||||
continue
|
continue
|
||||||
|
|
||||||
key = 'HTTP_' + hdr_name.replace('-', '_')
|
key = 'HTTP_' + hdr_name.replace('-', '_')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user