/aosp_15_r20/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
H A 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 …]
|
/aosp_15_r20/external/rust/android-crates-io/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 …]
|
/aosp_15_r20/external/rust/android-crates-io/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 …]
|
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/httpclient/ |
D | AdServicesHttpsClientTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 82 import java.net.URL; 94 private static final String CACHE_HEADER = "Cache-Control: max-age=60"; 95 private static final String NO_CACHE_HEADER = "Cache-Control: no-cache"; 114 @Mock private URL mUrlMock; 140 URL url = server.getUrl(mReportingPath); in testGetAndReadNothingSuccessfulResponse() local 142 assertThat(getAndReadNothing(Uri.parse(url.toString()), DEV_CONTEXT_DISABLED)).isNull(); in testGetAndReadNothingSuccessfulResponse() 149 URL url = server.getUrl(mReportingPath); in testGetAndReadNothingSuccessfulResponse_DevOptionsEnabled() local 151 assertThat(getAndReadNothing(Uri.parse(url.toString()), DEV_CONTEXT_ENABLED)).isNull(); in testGetAndReadNothingSuccessfulResponse_DevOptionsEnabled() 158 URL url = server.getUrl(mReportingPath); in testGetAndReadNothingCorrectPath() local [all …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/external/jsoup/src/main/java/org/jsoup/ |
H A 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 …]
|
/aosp_15_r20/external/python/cpython3/Lib/urllib/ |
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 …]
|
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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567/python3/lib/python3.11/urllib/ |
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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r536225/python3/lib/python3.11/urllib/ |
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 …]
|
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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r522817/python3/lib/python3.11/urllib/ |
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 …]
|
/aosp_15_r20/prebuilts/build-tools/common/py3-stdlib/urllib/ |
H A 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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567b/python3/lib/python3.11/urllib/ |
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 …]
|
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 …]
|
/aosp_15_r20/external/jsoup/src/test/java/org/jsoup/integration/ |
H A 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 …]
|
H A 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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567b/python3/lib/python3.11/site-packages/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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r522817/python3/lib/python3.11/site-packages/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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567/python3/lib/python3.11/site-packages/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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r536225/python3/lib/python3.11/site-packages/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 …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
D | VenueUrlElementTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 31 import java.net.URL; 52 * Helper function for appending a Venue URL to an output stream. 56 * @param url The URL string 58 private void appendVenue(ByteArrayOutputStream stream, int venueNumber, String url) in appendVenue() argument 60 byte[] venueBytes = url.getBytes(StandardCharsets.UTF_8); in appendVenue() 72 private byte[] getTestData(Map<Integer, URL> urls) throws IOException { in getTestData() 75 for (Map.Entry<Integer, URL> entry : urls.entrySet()) { in getTestData() 86 private byte[] getTestData(int venueNumber, String url) throws IOException { in getTestData() argument 88 appendVenue(stream, venueNumber, url); in getTestData() [all …]
|