mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix issue #80
This commit is contained in:
parent
42d97c3815
commit
e64c47475b
@ -62,6 +62,8 @@ def create(req, sock, client, server, cfg):
|
||||
if forward.find(",") >= 0:
|
||||
forward = forward.rsplit(",", 1)[1].strip()
|
||||
remote = forward.split(":")
|
||||
if len(remote) < 2:
|
||||
remote.append('80')
|
||||
if len(remote) == 1:
|
||||
remote.append('')
|
||||
else:
|
||||
@ -109,7 +111,7 @@ def create(req, sock, client, server, cfg):
|
||||
key = 'HTTP_' + key.replace('-', '_')
|
||||
if key not in ('HTTP_CONTENT_TYPE', 'HTTP_CONTENT_LENGTH'):
|
||||
environ[key] = value
|
||||
|
||||
|
||||
return resp, environ
|
||||
|
||||
class Response(object):
|
||||
|
||||
@ -80,6 +80,8 @@ class AsyncWorker(base.Worker):
|
||||
if req.should_close():
|
||||
raise StopIteration()
|
||||
self.cfg.post_request(self, req)
|
||||
except StopIteration:
|
||||
raise
|
||||
except Exception, e:
|
||||
#Only send back traceback in HTTP in debug mode.
|
||||
if not self.debug:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user