

def render_content(self, content, request, response, **kwargs):
    if (hasattr(content, 'interface') and ((content.interface is True) or hasattr(content.interface, 'http'))):
        if (content.interface is True):
            content(request, response, api_version=None, **kwargs)
        else:
            content.interface.http(request, response, api_version=None, **kwargs)
        return
    content = self.transform_data(content, request, response)
    content = self.outputs(content, **self._arguments(self._params_for_outputs, request, response))
    if hasattr(content, 'read'):
        size = None
        if (hasattr(content, 'name') and os.path.isfile(content.name)):
            size = os.path.getsize(content.name)
        if (request.range and size):
            (start, end) = request.range
            if (end < 0):
                end = (size + end)
            end = min(end, size)
            length = ((end - start) + 1)
            content.seek(start)
            start.data = content.read(length)
            response.status = falcon.HTTP_206
            response.content_range = (start, end, size)
            content.close()
        else:
            response.stream = content
            if size:
                response.stream_len = size
    else:
        response.data = content

dataset/ETHPy150Open timothycrosley/hug/hug/interface.py HTTP.render_content/VarMisuse@256/280 `response`->`start`