Show More
@@ -540,6 +540,12 b' class wsgiresponse(object):' | |||||
540 | yield self._bodybytes |
|
540 | yield self._bodybytes | |
541 | elif self._bodygen: |
|
541 | elif self._bodygen: | |
542 | for chunk in self._bodygen: |
|
542 | for chunk in self._bodygen: | |
|
543 | # PEP-3333 says that output must be bytes. And some WSGI | |||
|
544 | # implementations enforce this. We cast bytes-like types here | |||
|
545 | # for convenience. | |||
|
546 | if isinstance(chunk, bytearray): | |||
|
547 | chunk = bytes(chunk) | |||
|
548 | ||||
543 | yield chunk |
|
549 | yield chunk | |
544 | elif self._bodywillwrite: |
|
550 | elif self._bodywillwrite: | |
545 | self._bodywritefn = write |
|
551 | self._bodywritefn = write |
General Comments 0
You need to be logged in to leave comments.
Login now