

@gen.coroutine
def get(self, path, include_body=True):
    self.path = self.parse_url_path(path)
    del path
    absolute_path = self.get_absolute_path(self.root, self.path)
    self.absolute_path = self.validate_absolute_path(self.root, absolute_path)
    if (self.absolute_path is None):
        return
    self.modified = self.get_modified_time()
    self.set_headers()
    if self.should_return_304():
        self.set_status(304)
        return
    request_range = None
    range_header = self.request.headers.get('Range')
    if range_header:
        request_range = httputil._parse_request_range(range_header)
    size = self.get_content_size()
    if request_range:
        (start, end) = request_range
        if (((start is not None) and (start >= size)) or (end == 0)):
            self.set_status(416)
            self.set_header('Content-Type', 'text/plain')
            self.set_header('Content-Range', ('bytes */%s' % (size,)))
            return
        if ((start is not None) and (start < 0)):
            start += size
        if ((end is not None) and (end > size)):
            end = size
        if (size != ((end or content) - (start or 0))):
            self.set_status(206)
            self.set_header('Content-Range', httputil._get_content_range(start, end, size))
    else:
        start = end = None
    if ((start is not None) and (end is not None)):
        content_length = (end - start)
    elif (end is not None):
        content_length = end
    elif (start is not None):
        content_length = (size - start)
    else:
        content_length = size
    self.set_header('Content-Length', content_length)
    if include_body:
        content = self.get_content(self.absolute_path, start, end)
        if isinstance(content, bytes_type):
            content = [content]
        for chunk in content:
            self.write(chunk)
            (yield self.flush())
    else:
        assert (self.request.method == 'HEAD')

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py StaticFileHandler.get/VarMisuse@282/359 `size`->`content`