Home | History | Annotate | Download | only in python2.7

Lines Matching refs:Path

459     known_attrs = ("expires", "domain", "path", "secure",
610 """Path component of request-URI, as defined by RFC 2965."""
613 path = escape_path(parts.path)
614 if not path.startswith("/"):
616 path = "/" + path
617 return path
639 def escape_path(path):
643 # path characters, we pick UTF-8, as recommended in the HTML 4.0
649 if isinstance(path, unicode):
650 path = path.encode("utf-8")
651 path = urllib.quote(path, HTTP_PATH_SAFE)
652 path = ESCAPED_CHAR_RE.sub(uppercase_escaped_char, path)
653 return path
728 path, path_specified,
756 self.path = path
783 limit = self.domain + p + self.path
795 "path", "path_specified",
832 def path_return_ok(self, path, request):
833 """Return false if cookies should not be returned, given cookie path.
922 for n in "version", "verifiability", "name", "path", "domain", "port":
971 not req_path.startswith(cookie.path)):
972 _debug(" path attribute %s is not a prefix of request "
973 "path %s", cookie.path, req_path)
1064 # Path has already been checked by .path_return_ok(), and domain
1166 def path_return_ok(self, path, request):
1167 _debug("- checking cookie path=%s", path)
1169 if not req_path.startswith(path):
1170 _debug(" %s does not path-match %s", req_path, path)
1234 for path in cookies_by_path.keys():
1235 if not self._policy.path_return_ok(path, request):
1237 cookies_by_name = cookies_by_path[path]
1256 like ['foo="bar"; $Path="/"', ...]
1262 # add cookies in order of most specific (ie. longest) path first
1263 cookies.sort(key=lambda arg: len(arg.path), reverse=True)
1297 attrs.append('$Path="%s"' % cookie.path)
1354 domain, path and port) and rest is a dictionary containing the rest of
1363 "domain", "path", "port",
1448 path = standard.get("path", Absent)
1465 # set default path
1466 if path is not Absent and path != "":
1468 path = escape_path(path)
1471 path = request_path(request)
1472 i = path.rfind("/")
1476 path = path[:i]
1478 path = path[:i+1]
1479 if len(path) == 0: path = "/"
1515 self.clear(domain, path, name)
1518 _debug("Expiring cookie, domain='%s', path='%s', name='%s'",
1519 domain, path, name)
1526 path, path_specified,
1597 lookup[(cookie.domain, cookie.path, cookie.name)] = None
1600 key = ns_cookie.domain, ns_cookie.path, ns_cookie.name
1629 if cookie.path not in c2: c2[cookie.path] = {}
1630 c3 = c2[cookie.path]
1649 def clear(self, domain=None, path=None, name=None):
1655 path within that domain are removed. If given three arguments, then
1656 the cookie with the specified name, path and domain is removed.
1662 if (domain is None) or (path is None):
1664 "domain and path must be given to remove a cookie by name")
1665 del self._cookies[domain][path][name]
1666 elif path is not None:
1669 "domain must be given to remove cookies by path")
1670 del self._cookies[domain][path]
1687 self.clear(cookie.domain, cookie.path, cookie.name)
1706 self.clear(cookie.domain, cookie.path, cookie.name)