def cbCollectBody(response):
    protocol = proto_helpers.AccumulatingProtocol()
    response.deliverBody(protocol)
    d = protocol.closedDeferred = defer.Deferred()
    d.addCallback((lambda _: (protocol, response)))
    return d
def cbCollectBody(response):
    protocol = proto_helpers.AccumulatingProtocol()
    response.deliverBody(protocol)
    d = protocol.closedDeferred = defer.Deferred()
    d.addCallback((lambda _: (protocol, response)))
    return d