mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
don't accept str or unicode in the body.
This commit is contained in:
parent
008161dd66
commit
030468d2cd
@ -280,9 +280,6 @@ class Response(object):
|
|||||||
def write(self, arg):
|
def write(self, arg):
|
||||||
self.send_headers()
|
self.send_headers()
|
||||||
|
|
||||||
if isinstance(arg, text_type):
|
|
||||||
arg = arg.encode('utf-8')
|
|
||||||
|
|
||||||
assert isinstance(arg, binary_type), "%r is not a byte." % arg
|
assert isinstance(arg, binary_type), "%r is not a byte." % arg
|
||||||
|
|
||||||
arglen = len(arg)
|
arglen = len(arg)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user