• Home
  • Raw
  • Download

Lines Matching +full:- +full:scheme

5 RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
12 Berners-Lee, R. Fielding, and L. Masinter, August 1998.
14 RFC 2368: "The mailto URL scheme", by P.Hoffman , L Masinter, J. Zawinski, July 1998.
19 RFC 1738: "Uniform Resource Locators (URL)" by T. Berners-Lee, L. Masinter, M.
42 # The empty string classifies URLs with no scheme specified,
61 # compatibility. (They are undocumented, but have a public-looking name.)
73 # Characters valid in scheme names
77 '+-.')
93 # presented, we may relax this by using latin-1
113 # - noop for str inputs
114 # - encoding function otherwise
117 # We special-case the empty string to support the
118 # "scheme=''" default argument to some functions
120 raise TypeError("Cannot mix str and non-str arguments")
171 raise ValueError("Port out of range 0-65535")
239 'SplitResult', 'scheme netloc path query fragment')
241 'ParseResult', 'scheme netloc path params query fragment')
246 A 2-tuple that contains the url without fragment identifier and the fragment
259 SplitResult(scheme, netloc, path, query, fragment)
261 A 5-tuple that contains the different components of a URL. Similar to
265 _SplitResultBase.scheme.__doc__ = """Specifies URL scheme for the request."""
276 The query component, that contains non-hierarchical data, that along with data
277 in path component, identifies a resource in the scope of URI's scheme and
287 ParseResult(scheme, netloc, path, params, query, fragment)
289 A 6-tuple that contains components of a parsed URL.
292 _ParseResultBase.scheme.__doc__ = _SplitResultBase.scheme.__doc__
361 def urlparse(url, scheme='', allow_fragments=True): argument
363 <scheme>://<netloc>/<path>;<params>?<query>#<fragment>
364 Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
367 url, scheme, _coerce_result = _coerce_args(url, scheme)
368 splitresult = urlsplit(url, scheme, allow_fragments)
369 scheme, netloc, url, query, fragment = splitresult
370 if scheme in uses_params and ';' in url:
374 result = ParseResult(scheme, netloc, url, params, query, fragment)
409 def urlsplit(url, scheme='', allow_fragments=True): argument
411 <scheme>://<netloc>/<path>?<query>#<fragment>
412 Return a 5-tuple: (scheme, netloc, path, query, fragment).
415 url, scheme, _coerce_result = _coerce_args(url, scheme)
417 key = url, scheme, allow_fragments, type(url), type(scheme)
446 # "scheme" is really part of the path)
450 scheme, url = url[:i].lower(), rest
462 v = SplitResult(scheme, netloc, url, query, fragment)
471 scheme, netloc, url, params, query, fragment, _coerce_result = (
475 return _coerce_result(urlunsplit((scheme, netloc, url, query, fragment)))
479 complete URL as a string. The data argument can be any five-item iterable.
483 scheme, netloc, url, query, fragment, _coerce_result = (
485 if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'):
488 if scheme:
489 url = scheme + ':' + url
507 scheme, netloc, path, params, query, fragment = \
510 if scheme != bscheme or scheme not in uses_relative:
512 if scheme in uses_netloc:
514 return _coerce_result(urlunparse((scheme, netloc, path,
523 return _coerce_result(urlunparse((scheme, netloc, path,
527 if base_parts[-1] != '':
530 del base_parts[-1]
537 # filter out elements that would cause redundant slashes on re-joining
539 segments[1:-1] = filter(None, segments[1:-1])
556 if segments[-1] in ('.', '..'):
557 # do some post-processing here. if the last segment was a relative dir,
561 return _coerce_result(urlunparse((scheme, netloc, '/'.join(
585 """unquote_to_bytes('abc%20def') -> b'abc def'."""
586 # Note: strings are encoded as UTF-8. This is only an issue if it contains
587 # unescaped non-ASCII characters, which URIs should not.
589 # Is it a string-like object?
593 string = string.encode('utf-8')
614 _asciire = re.compile('([\x00-\x7f]+)')
616 def unquote(string, encoding='utf-8', errors='replace'):
617 """Replace %xx escapes by their single-character equivalent. The optional
618 encoding and errors parameters specify how to decode percent-encoded
621 By default, percent-encoded sequences are decoded with UTF-8, and invalid
624 unquote('abc%20def') -> 'abc def'.
630 encoding = 'utf-8'
643 encoding='utf-8', errors='replace', max_num_fields=None):
648 qs: percent-encoded query string to be parsed
651 percent-encoded queries should be treated as blank strings.
661 encoding and errors: specify how to decode percent-encoded sequences
682 encoding='utf-8', errors='replace', max_num_fields=None):
687 qs: percent-encoded query string to be parsed
690 percent-encoded queries should be treated as blank strings.
699 encoding and errors: specify how to decode percent-encoded sequences
705 Returns a list, as G-d intended.
726 # Handle case of a control-name with no equal sign
741 def unquote_plus(string, encoding='utf-8', errors='replace'):
745 unquote_plus('%7e/abc+def') -> '~/abc def'
753 b'_.-~')
760 String values are percent-encoded byte values, unless the key < 128, and
780 """quote('abc def') -> 'abc%20def'
807 non-ASCII characters, as accepted by the str.encode method.
808 By default, encoding='utf-8' (characters are encoded with UTF-8), and
815 encoding = 'utf-8'
845 not perform string-to-bytes encoding. It always returns an ASCII string.
846 quote_from_bytes(b'abc def\x3f') -> 'abc%20def%3f'
853 # Normalize 'safe' by converting to bytes and removing non-ASCII chars
867 """Encode a dict or sequence of two-element tuples into a URL query string.
872 If the query arg is a sequence of two-element tuples, the order of the
885 # It's a bother at times that strings and string-like objects are
888 # non-sequence items should not work with len()
889 # non-empty strings will fail this
892 # Zero-length sequences of all types will get here and succeed,
898 raise TypeError("not a valid non-string sequence "
929 # Is this a sufficient test for sequence-ness?
946 """to_bytes(u"URL") --> 'URL'."""
955 " contains non-ASCII characters")
959 """unwrap('<URL:type://host/path>') --> 'type://host/path'."""
961 if url[:1] == '<' and url[-1:] == '>':
962 url = url[1:-1].strip()
968 """splittype('type:opaquestring') --> 'type', 'opaquestring'."""
975 scheme, data = match.groups()
976 return scheme.lower(), data
981 """splithost('//host[:port]/path') --> 'host[:port]', '/path'."""
995 """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
1000 """splitpasswd('user:passwd') -> 'user', 'passwd'."""
1004 # splittag('/path#tag') --> '/path', 'tag'
1007 """splitport('host:port') --> 'host', 'port'."""
1010 _portprog = re.compile('(.*):([0-9]*)$', re.DOTALL)
1019 def splitnport(host, defport=-1):
1021 Return given default port if no ':' found; defaults to -1.
1036 """splitquery('/path?query') --> '/path', 'query'."""
1043 """splittag('/path#tag') --> '/path', 'tag'."""
1050 """splitattr('/path;attr1=value1;attr2=value2;...') ->
1056 """splitvalue('attr=value') --> 'attr', 'value'."""