Lines Matching refs:path

481     known_attrs = ("expires", "domain", "path", "secure",
651 path = escape_path(parts.path)
652 if not path.startswith("/"):
654 path = "/" + path
655 return path
677 def escape_path(path):
681 # path characters, we pick UTF-8, as recommended in the HTML 4.0
687 path = urllib.parse.quote(path, HTTP_PATH_SAFE)
688 path = ESCAPED_CHAR_RE.sub(uppercase_escaped_char, path)
689 return path
764 path, path_specified,
792 self.path = path
819 limit = self.domain + p + self.path
831 "path", "path_specified",
868 def path_return_ok(self, path, request):
869 """Return false if cookies should not be returned, given cookie path.
960 for n in "version", "verifiability", "name", "path", "domain", "port":
1009 not self.path_return_ok(cookie.path, request)):
1010 _debug(" path attribute %s is not a prefix of request "
1011 "path %s", cookie.path, req_path)
1214 def path_return_ok(self, path, request):
1215 _debug("- checking cookie path=%s", path)
1217 pathlen = len(path)
1218 if req_path == path:
1220 elif (req_path.startswith(path) and
1221 (path.endswith("/") or req_path[pathlen:pathlen+1] == "/")):
1224 _debug(" %s does not path-match %s", req_path, path)
1278 for path in cookies_by_path.keys():
1279 if not self._policy.path_return_ok(path, request):
1281 cookies_by_name = cookies_by_path[path]
1306 # add cookies in order of most specific (ie. longest) path first
1307 cookies.sort(key=lambda a: len(a.path), reverse=True)
1341 attrs.append('$Path="%s"' % cookie.path)
1398 domain, path and port) and rest is a dictionary containing the rest of
1407 "domain", "path", "port",
1492 path = standard.get("path", Absent)
1509 # set default path
1510 if path is not Absent and path != "":
1512 path = escape_path(path)
1515 path = request_path(request)
1516 i = path.rfind("/")
1520 path = path[:i]
1522 path = path[:i+1]
1523 if len(path) == 0: path = "/"
1559 self.clear(domain, path, name)
1562 _debug("Expiring cookie, domain='%s', path='%s', name='%s'",
1563 domain, path, name)
1570 path, path_specified,
1642 lookup[(cookie.domain, cookie.path, cookie.name)] = None
1645 key = ns_cookie.domain, ns_cookie.path, ns_cookie.name
1674 if cookie.path not in c2: c2[cookie.path] = {}
1675 c3 = c2[cookie.path]
1692 def clear(self, domain=None, path=None, name=None):
1698 path within that domain are removed. If given three arguments, then
1699 the cookie with the specified name, path and domain is removed.
1705 if (domain is None) or (path is None):
1707 "domain and path must be given to remove a cookie by name")
1708 del self._cookies[domain][path][name]
1709 elif path is not None:
1712 "domain must be given to remove cookies by path")
1713 del self._cookies[domain][path]
1730 self.clear(cookie.domain, cookie.path, cookie.name)
1749 self.clear(cookie.domain, cookie.path, cookie.name)
1838 ("path", cookie.path),
1916 "port", "path", "domain",
1962 h("path"), h("path_spec"),
2044 domain, domain_specified, path, secure, expires, name, value = \
2067 path, False,
2124 "\t".join([domain, initial_dot, cookie.path,