

def _get_host_handlers(self, request):
    host = request.host.lower().split(':')[0]
    matches = []
    for (pattern, handlers) in self.handlers:
        if pattern.match(host):
            matches.extend(handlers)
    if ((not matches) and ('X-Real-Ip' not in request.headers)):
        for (pattern, handlers) in self.handlers:
            if pattern.match(self.default_host):
                matches.extend(handlers)
    return (matches or None)

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py Application._get_host_handlers/original