def map_static(self):
        '''
        handle static files
        file_match but no hyphen mapping
        '''
        if self.controller != 'static':
            return None, None
        version = regex_version.match(self.args(0))
        if self.args and version:
            file = '/'.join(self.args[1:])
        else:
            file = '/'.join(self.args)
        if len(self.args) == 0:
            bad_static = True   # require a file name
        elif '/' in self.file_match:
            # match the path
            bad_static = not self.router._file_match.match(file)
        else:
            # match path elements
            bad_static = False
            for name in self.args:
                bad_static = bad_static or name in (
                    '', '.', '..') or not self.router._file_match.match(name)
        if bad_static:
            log_rewrite('bad static path=%s' % file)
            raise HTTP(400,
                       THREAD_LOCAL.routes.error_message % 'invalid request',
                       web2py_error='invalid static file')
        #
        #  support language-specific static subdirectories,
        #  eg /appname/en/static/filename => applications/appname/static/en/filename
        #  if language-specific file doesn't exist, try same file in static
        #
        if self.language:
            static_file = pjoin(self.request.env.applications_parent,
                                'applications', self.application,
                                'static', self.language, file)
        if not self.language or not isfile(static_file):
            static_file = pjoin(self.request.env.applications_parent,
                                'applications', self.application,
                                'static', file)
        self.extension = None
        log_rewrite("route: static=%s" % static_file)
        return static_file, version
dataset/ETHPy150Open uwdata/termite-visualizations/web2py/gluon/rewrite.py/MapUrlIn.map_static/original