Tells if the hc path of the request corresponds to that specified by the admin

        :return: a boolean that says if it corresponds or not
356125
def request_hc_path_corresponds(self):
        
        uri_path = self.path.split(COAP_PREFACE)
        request_hc_path = uri_path[0]
        logger.debug("HCPATH: %s", hc_path)
        # print HC_PATH
        logger.debug("URI: %s", request_hc_path)
        if hc_path != request_hc_path:
            return False
        else:
            return True
74521
def is_subpath(path, parent):
  '''
  
  '''

  try:
    relpath = os.path.relpath(path, parent)
  except ValueError:
    return False  # happens on Windows if drive letters don't match
  return relpath == os.curdir or not relpath.startswith(os.pardir)
912721
def is_passive_request(self, request):
        
        if request.path in PASSIVE_URLS:
            return True

        try:
            match = resolve(request.path)
            # TODO: check namespaces too
            if match.url_name in PASSIVE_URL_NAMES:
                return True
        except Resolver404:
            pass

        return False
856014
def isdir(self, relpath):
    """"""
    if self._isdir_raw(relpath):
      if not self.isignored(relpath, directory=True):
        return True

    return False
267514
def is_super_admin(self, req):
        
        return req.headers.get('x-auth-admin-user') == '.super_admin' and \
            self.super_admin_key and \
            req.headers.get('x-auth-admin-key') == self.super_admin_key
1055596
def _ensure_url_has_path(self, url):
        
        inx = url.find('://')
        if inx > 0:
            rest = url[inx + 3:]
        elif url.startswith('//'):
            rest = url[2:]
        else:
            rest = url

        if '/' in rest:
            return url

        scheme, netloc, path, query, frag = urlsplit(url)
        if not path:
            path = '/'

        url = urlunsplit((scheme, netloc, path, query, frag))
        return url
44022
def isdir(self, path):
        
        (bucket, key) = self._path_to_bucket_and_key(path)

        s3_bucket = self.s3.Bucket(bucket)

        # root is a directory
        if self._is_root(key):
            return True

        for suffix in (S3_DIRECTORY_MARKER_SUFFIX_0,
                       S3_DIRECTORY_MARKER_SUFFIX_1):
            try:
                self.s3.meta.client.get_object(
                    Bucket=bucket, Key=key + suffix)
            except botocore.exceptions.ClientError as e:
                if not e.response['Error']['Code'] in ['NoSuchKey', '404']:
                    raise
            else:
                return True

        # files with this prefix
        key_path = self._add_path_delimiter(key)
        s3_bucket_list_result = list(itertools.islice(
            s3_bucket.objects.filter(Prefix=key_path), 1))
        if s3_bucket_list_result:
            return True

        return False
771349
def _paths_equal(lhs, rhs):
    

    if lhs is rhs:
        return True
    if lhs.host is not None and rhs.host is not None and lhs.host != rhs.host:
        return False
    # need to make sure this stays in sync with CIMInstanceName.__cmp__()
    return not (pywbem.cmpname(rhs.classname, lhs.classname) or
                cmp(rhs.keybindings, lhs.keybindings) or
                pywbem.cmpname(rhs.namespace, lhs.namespace))
641780
def _should_sign_request_header(header_name):
    

    if header_name in {_HEADER_USER_AGENT, _HEADER_CACHE_CONTROL}:
        return True

    if re.match(_PATTERN_HEADER_PREFIX_BUNQ, header_name):
        return True

    return False
155201
def is_manager(self, path):
        ''''''
        node = self.get_node(path)
        if not node:
            return False
        return node.is_manager
728845
private static boolean pathMatches(URI uri, HttpCookie cookie) {
        return normalizePath(uri.getPath()).startsWith(normalizePath(cookie.getPath()));
    }
857995
def isfile(self, path, follow_symlinks=True):
        
        return self._is_of_type(path, S_IFREG, follow_symlinks)
727910
def is_local(path):
    # type: (str) -> bool
    
    if not running_under_virtualenv():
        return True
    return normalize_path(path).startswith(normalize_path(sys.prefix))
209184
def is_dir_url(link):
    # type: (Link) -> bool
    
    link_path = url_to_path(link.url_without_fragment)
    return os.path.isdir(link_path)
78421
def has_in_url_path(url, subs):
    """"""
    scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
    return any([sub in path for sub in subs])
1320196
def resolve_request_path(requested_uri):
    
    from settings import PATH_ALIASES

    for key, val in PATH_ALIASES.items():
        if re.match(key, requested_uri):
            return re.sub(key, val, requested_uri)
    return requested_uri
1347449
protected boolean shouldIgnorePath(String requestUri) {
        for (String path : router.getIgnorePaths()) {
            if (requestUri.startsWith(path)) {
                return true;
            }
        }

        return false;
    }