You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@implementer(IStreamIterator)
class filestream_range_iterator(Iterable):
to
@implementer(IUnboundStreamIterator)
class filestream_range_iterator(Iterable):
because the WSGIResponse Object in Zope.ZPublisher.HTTPResponse check for IUnboundStreamIterator not for IStreamIterator
def setBody(self, body, title='', is_error=False, lock=None):
# allow locking of the body in the same way as the status
if self._locked_body:
return
if isinstance(body, IOBase):
body.seek(0, 2)
length = body.tell()
body.seek(0)
self.setHeader('Content-Length', '%d' % length)
self.body = body
elif IStreamIterator.providedBy(body):
self.body = body
super(WSGIResponse, self).setBody(b'', title, is_error)
elif IUnboundStreamIterator.providedBy(body):
self.body = body
self._streaming = 1
super(WSGIResponse, self).setBody(b'', title, is_error)
else:
super(WSGIResponse, self).setBody(body, title, is_error)
But i'm not so deep in this package, to answer this question.
see: collective/wildcard.media#75
The text was updated successfully, but these errors were encountered: