| /external/rust/crates/url/tests/ |
| D | unit.rs | 1 // Copyright 2013-2014 The rust-url developers. 3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 15 use url::{form_urlencoded, Host, Origin, Url}; 20 assert_eq!(size_of::<Url>(), size_of::<Option<Url>>()); in size() 25 let base: Url = "sc://%C3%B1".parse().unwrap(); in test_relative() 26 let url = base.join("/resources/testharness.js").unwrap(); in test_relative() localVariable 27 assert_eq!(url.as_str(), "sc://%C3%B1/resources/testharness.js"); in test_relative() 32 let base: Url = "sc://%C3%B1".parse().unwrap(); in test_relative_empty() [all …]
|
| D | data.rs | 1 // Copyright 2013-2014 The rust-url developers. 3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 9 //! Data-driven tests 14 use url::{quirks, Url}; 31 // Copied from https://github.com/web-platform-tests/wpt/blob/master/url/ in urltestdata() 33 .expect("JSON parse error in urltestdata.json"); in urltestdata() 55 let base = match Url::parse(&base) { in urltestdata() 61 &format!("parse base for {:?}", input), in urltestdata() [all …]
|
| D | debugger_visualizer.rs | 2 use url::Url; 26 pattern:debugger_visualizer-.*\.exe \(embedded NatVis ".*-[0-9]+\.natvis"\) 28 base_url : "http://example.org/foo/bar" [Type: url::Url] 29 [<Raw View>] [Type: url::Url] 34 url_with_non_special_scheme : "non-special://test/x" [Type: url::Url] 35 [<Raw View>] [Type: url::Url] 36 [scheme] : "non-special" 40 url_with_user_pass_port_query_fragments : "http://user:pass@foo:21/bar;par?b#c" [Type: url::Url] 41 [<Raw View>] [Type: url::Url] 50 url_blob : "blob:https://example.com:443/" [Type: url::Url] [all …]
|
| /external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
| D | HttpUrlTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 22 import java.net.URL; 37 HttpUrl expected = HttpUrl.parse("http://host/"); in parseTrimsAsciiWhitespace() 38 assertEquals(expected, HttpUrl.parse("http://host/\f\n\t \r")); // Leading. in parseTrimsAsciiWhitespace() 39 assertEquals(expected, HttpUrl.parse("\r\n\f \thttp://host/")); // Trailing. in parseTrimsAsciiWhitespace() 40 assertEquals(expected, HttpUrl.parse(" http://host/ ")); // Both. in parseTrimsAsciiWhitespace() 41 assertEquals(expected, HttpUrl.parse(" http://host/ ")); // Both. in parseTrimsAsciiWhitespace() 42 assertEquals(expected, HttpUrl.parse("http://host/").resolve(" ")); in parseTrimsAsciiWhitespace() 43 assertEquals(expected, HttpUrl.parse("http://host/").resolve(" . ")); in parseTrimsAsciiWhitespace() 48 assertNull(HttpUrl.parse("http://" + host + "/")); in parseHostAsciiNonPrintable() [all …]
|
| D | RequestTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 23 import java.net.URL; 35 MediaType contentType = MediaType.parse("text/plain; charset=utf-8"); in string() 44 MediaType contentType = MediaType.parse("text/plain"); in stringWithDefaultCharsetAdded() 46 assertEquals(MediaType.parse("text/plain; charset=utf-8"), body.contentType()); in stringWithDefaultCharsetAdded() 52 MediaType contentType = MediaType.parse("text/plain; charset=utf-16be"); in stringWithNonDefaultCharsetSpecified() 60 MediaType contentType = MediaType.parse("text/plain"); in byteArray() 69 MediaType contentType = MediaType.parse("text/plain"); in byteArrayRange() 83 MediaType contentType = MediaType.parse("text/plain"); in file() 93 MediaType contentType = MediaType.parse("application/json"); in crudVerbs() [all …]
|
| /external/rust/crates/url/src/ |
| D | lib.rs | 1 // Copyright 2013-2015 The rust-url developers. 3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 11 rust-url is an implementation of the [URL Standard](http://url.spec.whatwg.org/) 12 for the [Rust](http://rust-lang.org/) programming language. 15 # URL parsing and data structures 17 First, URL parsing may fail for various reasons and therefore returns a `Result`. 20 use url::{Url, ParseError}; 22 assert!(Url::parse("http://[:::1]") == Err(ParseError::InvalidIpv6Address)) [all …]
|
| D | path_segments.rs | 1 // Copyright 2016 The rust-url developers. 3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 10 use crate::Url; 13 /// Exposes methods to manipulate the path of an URL that is not cannot-be-base. 15 /// The path always starts with a `/` slash, and is made of slash-separated segments. 21 /// use url::Url; 24 /// # fn run() -> Result<(), Box<dyn Error>> { 25 /// let mut url = Url::parse("mailto:me@example.com")?; [all …]
|
| /external/jsoup/src/main/java/org/jsoup/ |
| D | Jsoup.java | 15 import java.net.URL; 26 …Parse HTML into a Document. The parser will make a sensible, balanced document tree out of any HTM… 28 @param html HTML to parse 29 …@param baseUri The URL where the HTML was retrieved from. Used to resolve relative URLs to absolut… 33 public static Document parse(String html, String baseUri) { in parse() method in Jsoup 34 return Parser.parse(html, baseUri); in parse() 38 …Parse HTML into a Document, using the provided Parser. You can provide an alternate parser, such a… 39 (non-HTML) parser. 41 @param html HTML to parse 42 …@param baseUri The URL where the HTML was retrieved from. Used to resolve relative URLs to absolut… [all …]
|
| /external/python/cpython3/Lib/urllib/ |
| D | robotparser.py | 10 http://www.robotstxt.org/norobots-rfc.txt 14 import urllib.parse 23 """ This class provides a set of methods to read, parse and answer 28 def __init__(self, url=''): argument 34 self.set_url(url) 40 This is useful for long-running web spiders that need to 54 def set_url(self, url): argument 55 """Sets the URL referring to a robots.txt file.""" 56 self.url = url 57 self.host, self.path = urllib.parse.urlparse(url)[1:3] [all …]
|
| D | parse.py | 1 """Parse (absolute and relative) URLs. 5 RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding 8 RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter 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. 29 The WHATWG URL Parser spec should also be considered. We are not compliant with 69 # compatibility. (They are undocumented, but have a public-looking name.) 85 '+-.') 103 # presented, we may relax this by using latin-1 [all …]
|
| /external/python/cpython3/Lib/test/ |
| D | test_urlparse.py | 4 import urllib.parse 11 # Each parse_qsl testcase is a two-tuple that contains 41 # Each parse_qs testcase is a two-tuple that contains 73 def checkRoundtrips(self, url, parsed, split): argument 74 result = urllib.parse.urlparse(url) 80 result2 = urllib.parse.urlunparse(result) 81 self.assertEqual(result2, url) 84 # the result of geturl() is a fixpoint; we can always parse it 86 result3 = urllib.parse.urlparse(result.geturl()) 101 result = urllib.parse.urlsplit(url) [all …]
|
| D | test_urllib.py | 3 import urllib.parse 43 def urlopen(url, data=None, proxies=None): argument 44 """urlopen(url [, data]) -> open file-like object""" 54 return opener.open(url) 56 return opener.open(url, data) 88 self.io_refs -= 1 102 # bpo-36918: HTTPConnection destructor calls close() which calls 161 self.quoted_pathname = urllib.parse.quote(self.pathname) 209 self.assertEqual(self.returned_obj.url, self.quoted_pathname) 358 # Issue #11703: geturl() omits fragments in the original URL. [all …]
|
| /external/rust/crates/miette-derive/src/ |
| D | url.rs | 5 parse::{Parse, ParseStream}, 18 pub enum Url { enum 23 impl Parse for Url { implementation 24 fn parse(input: ParseStream) -> syn::Result<Self> { in parse() method 25 let ident = input.parse::<syn::Ident>()?; in parse() 26 if ident == "url" { in parse() 32 let fmt = content.parse()?; in parse() 43 Ok(Url::Display(display)) in parse() 45 let option = content.parse::<syn::Ident>()?; in parse() 47 Ok(Url::DocsRs) in parse() [all …]
|
| D | diagnostic_arg.rs | 1 use syn::parse::{Parse, ParseStream}; 7 use crate::url::Url; 14 Url(Url), enumerator 18 impl Parse for DiagnosticArg { 19 fn parse(input: ParseStream) -> syn::Result<Self> { in parse() method 20 let ident = input.fork().parse::<syn::Ident>()?; in parse() 23 let _: syn::Ident = input.parse()?; in parse() 26 Ok(DiagnosticArg::Forward(input.parse()?)) in parse() 28 Ok(DiagnosticArg::Code(input.parse()?)) in parse() 30 Ok(DiagnosticArg::Severity(input.parse()?)) in parse() [all …]
|
| /external/python/cpython3/Lib/ |
| D | nturl2path.py | 1 """Convert a NT pathname to a file URL and vice versa. 3 This module only exists to provide OS-specific code 8 def url2pathname(url): argument 9 """OS-specific conversion from a relative URL of the 'file' scheme 17 import string, urllib.parse 19 url = url.replace(':', '|') 20 if not '|' in url: 22 if url[:4] == '////': 26 url = url[2:] 27 components = url.split('/') [all …]
|
| /external/jsoup/src/test/java/org/jsoup/integration/ |
| D | UrlConnectTest.java | 22 import java.net.URL; 28 Tests the URL connection. Not enabled by default, so tests don't require network connection. 41 Document doc = res.parse(); in fetchBaidu() 51 … String url = "http://direct.jsoup.org/rez/osi_logo.png"; // not text/* but image/png, should throw in exceptOnUnknownContentType() local 54 Document doc = Jsoup.parse(new URL(url), 3000); in exceptOnUnknownContentType() 57 … be text/*, application/xml, or application/xhtml+xml. Mimetype=image/png, URL=http://direct.jsoup… in exceptOnUnknownContentType() 58 assertEquals(url, e.getUrl()); in exceptOnUnknownContentType() 68 assertEquals("", doc.title()); // this will cause an ugly parse tree in ignoresContentTypeIfSoConfigured() 87 assertEquals("https://jsoup.org/", con.response().url().toString()); in followsNewTempRedirect() 96 assertEquals("https://jsoup.org/", res.url().toExternalForm()); in postRedirectsFetchWithGet() [all …]
|
| D | ConnectTest.java | 31 import java.net.URL; 54 echoUrl = EchoServlet.Url; in setUp() 59 String url = HelloServlet.Url; in canConnectToLocalServer() local 60 Document doc = Jsoup.connect(url).get(); in canConnectToLocalServer() 66 String url = HelloServlet.TlsUrl; in canConnectToLocalTlsServer() local 67 Document doc = Jsoup.connect(url).get(); in canConnectToLocalTlsServer() 74 Document doc = Jsoup.parse(new URL(echoUrl), 10 * 1000); in fetchURl() 87 String url = "file://etc/passwd"; in exceptOnUnsupportedProtocol() local 90 Document doc = Jsoup.connect(url).get(); in exceptOnUnsupportedProtocol() 106 String url = EchoServlet.Url; in throwsExceptionOn404() local [all …]
|
| D | ProxyTest.java | 35 echoUrl = EchoServlet.Url; in setUp() 40 void fetchViaProxy(String url) throws IOException { in fetchViaProxy() argument 41 Connection con = Jsoup.connect(url) in fetchViaProxy() 45 if (url.startsWith("http:/")) assertVia(res); // HTTPS CONNECT won't have Via in fetchViaProxy() 47 Document doc = res.parse(); in fetchViaProxy() 53 return Stream.of(HelloServlet.Url, HelloServlet.TlsUrl); in helloUrls() 57 return Stream.of(EchoServlet.Url, EchoServlet.TlsUrl); in echoUrls() 66 .connect(RedirectServlet.Url) in redirectViaProxy() 68 .header("Random-Header-name", "hello") in redirectViaProxy() 73 Document doc = res.parse(); in redirectViaProxy() [all …]
|
| /external/python/setuptools/setuptools/ |
| D | package_index.py | 15 import urllib.parse 33 EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$') 37 r'href="[^?]+\?:action=show_md5&digest=([0-9a-f]{32})">md5</a>\)' 39 URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match 49 _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" 56 return Requirement.parse(spec) 59 "Not a URL, existing file, or requirement spec: %r" % (spec,) 71 base = name[:-10] 73 elif lower.startswith('.win32-py', -16): 74 py_ver = name[-7:-4] [all …]
|
| /external/python/cpython3/Doc/library/ |
| D | urllib.parse.rst | 1 :mod:`urllib.parse` --- Parse URLs into components 4 .. module:: urllib.parse 5 :synopsis: Parse URLs into or assemble them from components. 7 **Source code:** :source:`Lib/urllib/parse.py` 12 single: URL 13 pair: URL; parsing 14 pair: relative; URL 16 -------------- 18 This module defines a standard interface to break Uniform Resource Locator (URL) 20 combine the components back into a URL string, and to convert a "relative URL" [all …]
|
| /external/google-cloud-java/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ |
| D | NetworkEndpointGroupCloudFunctionOrBuilder.java | 8 * https://www.apache.org/licenses/LICENSE-2.0 30 …* A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 … 42 …* A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 … 54 …* A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 … 67 …parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions w… 79 …parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions w… 91 …parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions w…
|
| D | NetworkEndpointGroupAppEngineOrBuilder.java | 8 * https://www.apache.org/licenses/LICENSE-2.0 30 …rving service. The service name is case-sensitive and must be 1-63 characters long. Example value:… 42 …rving service. The service name is case-sensitive and must be 1-63 characters long. Example value:… 54 …rving service. The service name is case-sensitive and must be 1-63 characters long. Example value:… 67 …parse service and version fields from a request URL. URL mask allows for routing to multiple App E… 79 …parse service and version fields from a request URL. URL mask allows for routing to multiple App E… 91 …parse service and version fields from a request URL. URL mask allows for routing to multiple App E… 104 …* Optional serving version. The version name is case-sensitive and must be 1-100 characters long. … 116 …* Optional serving version. The version name is case-sensitive and must be 1-100 characters long. … 128 …* Optional serving version. The version name is case-sensitive and must be 1-100 characters long. …
|
| /external/python/setuptools/pkg_resources/_vendor/packaging/ |
| D | requirements.py | 7 import urllib.parse 43 PUNCTUATION = Word("-_.") 50 URI = Regex(r"[^ ]+")("url") 51 URL = AT + URI variable 77 URL_AND_MARKER = URL + Optional(MARKER) 88 """Parse a requirement. 90 Parse a given requirement string into its parts, such as name, specifier, 91 URL, and extras. Raises InvalidRequirement on a badly-formed requirement 100 def __init__(self, requirement_string: str) -> None: 105 f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}' [all …]
|
| /external/python/setuptools/setuptools/_vendor/packaging/ |
| D | requirements.py | 7 import urllib.parse 43 PUNCTUATION = Word("-_.") 50 URI = Regex(r"[^ ]+")("url") 51 URL = AT + URI variable 77 URL_AND_MARKER = URL + Optional(MARKER) 88 """Parse a requirement. 90 Parse a given requirement string into its parts, such as name, specifier, 91 URL, and extras. Raises InvalidRequirement on a badly-formed requirement 100 def __init__(self, requirement_string: str) -> None: 105 f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}' [all …]
|
| /external/rust/crates/rusqlite/src/types/ |
| D | url.rs | 1 //! [`ToSql`] and [`FromSql`] implementation for [`url::Url`]. 4 use url::Url; 6 /// Serialize `Url` to text. 7 impl ToSql for Url { implementation 9 fn to_sql(&self) -> Result<ToSqlOutput<'_>> { in to_sql() 14 /// Deserialize text to `Url`. 15 impl FromSql for Url { implementation 17 fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self> { in column_result() 21 Url::parse(s).map_err(|e| FromSqlError::Other(Box::new(e))) in column_result() 31 use url::{ParseError, Url}; [all …]
|