Don't encode byte responses
This commit is contained in:
parent
917a2e59ce
commit
73e0aa17c4
1 changed files with 8 additions and 2 deletions
|
@ -340,8 +340,14 @@ def encodeResponse(func):
|
||||||
back = func(*args, **kwargs)
|
back = func(*args, **kwargs)
|
||||||
if "__next__" in dir(back):
|
if "__next__" in dir(back):
|
||||||
for part in back:
|
for part in back:
|
||||||
yield part.encode()
|
if type(part) == bytes:
|
||||||
|
yield part
|
||||||
|
else:
|
||||||
|
yield part.encode()
|
||||||
else:
|
else:
|
||||||
yield back.encode()
|
if type(back) == bytes:
|
||||||
|
yield back
|
||||||
|
else:
|
||||||
|
yield back.encode()
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
Loading…
Reference in a new issue