Home
last modified time | relevance | path

Searched refs:url (Results 1 – 25 of 1205) sorted by relevance

12345678910>>...49

/external/libbrillo/brillo/
Durl_utils_unittest.cc13 url::Combine("http://sample.org", "path")); in TEST()
15 url::Combine("http://sample.org/", "path")); in TEST()
16 EXPECT_EQ("path1/path2", url::Combine("", "path1/path2")); in TEST()
17 EXPECT_EQ("path1/path2", url::Combine("path1", "path2")); in TEST()
18 EXPECT_EQ("http://sample.org", url::Combine("http://sample.org", "")); in TEST()
20 url::Combine("http://sample.org/", "/path")); in TEST()
22 url::Combine("http://sample.org", "//////path")); in TEST()
23 EXPECT_EQ("http://sample.org/", url::Combine("http://sample.org", "///")); in TEST()
25 url::Combine("http://sample.org/obj", "path1/path2")); in TEST()
27 url::Combine("http://sample.org/obj#tag", "path1/path2")); in TEST()
[all …]
Durl_utils.cc24 bool GetQueryStringPos(const std::string& url, in GetQueryStringPos() argument
28 size_t query_start = url.find_first_of("?#"); in GetQueryStringPos()
30 *query_pos = url.size(); in GetQueryStringPos()
38 size_t query_end = url.size(); in GetQueryStringPos()
41 if (url[query_start] == '?') { in GetQueryStringPos()
42 size_t pos_fragment = url.find('#', query_start); in GetQueryStringPos()
57 std::string url::TrimOffQueryString(std::string* url) { in TrimOffQueryString() argument
59 if (!GetQueryStringPos(*url, false, &query_pos, nullptr)) in TrimOffQueryString()
61 std::string query_string = url->substr(query_pos); in TrimOffQueryString()
62 url->resize(query_pos); in TrimOffQueryString()
[all …]
/external/webrtc/webrtc/base/
Dhttpcommon_unittest.cc24 Url<char> url(TEST_URL); in TEST() local
25 EXPECT_TRUE(url.valid()); in TEST()
26 EXPECT_FALSE(url.secure()); in TEST()
27 EXPECT_STREQ(TEST_HOST, url.host().c_str()); in TEST()
28 EXPECT_EQ(80, url.port()); in TEST()
29 EXPECT_STREQ(TEST_PATH, url.path().c_str()); in TEST()
30 EXPECT_STREQ(TEST_QUERY, url.query().c_str()); in TEST()
31 EXPECT_STREQ(TEST_HOST, url.address().c_str()); in TEST()
32 EXPECT_STREQ(TEST_PATH TEST_QUERY, url.full_path().c_str()); in TEST()
33 EXPECT_STREQ(TEST_URL, url.url().c_str()); in TEST()
[all …]
/external/python/cpython2/Lib/
Durlparse.py137 def urlparse(url, scheme='', allow_fragments=True): argument
143 tuple = urlsplit(url, scheme, allow_fragments)
144 scheme, netloc, url, query, fragment = tuple
145 if scheme in uses_params and ';' in url:
146 url, params = _splitparams(url)
149 return ParseResult(scheme, netloc, url, params, query, fragment)
151 def _splitparams(url): argument
152 if '/' in url:
153 i = url.find(';', url.rfind('/'))
155 return url, ''
[all …]
Durllib.py72 def urlopen(url, data=None, proxies=None, context=None): argument
87 return opener.open(url)
89 return opener.open(url, data)
90 def urlretrieve(url, filename=None, reporthook=None, data=None, context=None): argument
98 return opener.retrieve(url, filename, reporthook, data)
193 urltype, url = splittype(fullurl)
200 url = (host, fullurl) # Signal special case to open_*()
213 return getattr(self, name)(url)
215 return getattr(self, name)(url, data)
221 type, url = splittype(fullurl)
[all …]
Dwebbrowser.py58 def open(url, new=0, autoraise=True): argument
61 if browser.open(url, new, autoraise):
65 def open_new(url): argument
66 return open(url, 1)
68 def open_new_tab(url): argument
69 return open(url, 2)
147 def open(self, url, new=0, autoraise=True): argument
150 def open_new(self, url): argument
151 return self.open(url, 1)
153 def open_new_tab(self, url): argument
[all …]
Dnturl2path.py3 def url2pathname(url): argument
14 url = url.replace(':', '|')
15 if not '|' in url:
17 if url[:4] == '////':
21 url = url[2:]
22 components = url.split('/')
25 comp = url.split('|')
27 error = 'Bad URL: ' + url
36 if path.endswith(':') and url.endswith('/'):
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DRequest.java29 private final HttpUrl url; field in Request
40 this.url = builder.url; in Request()
48 return url; in httpUrl()
51 public URL url() { in url() method in Request
53 return result != null ? result : (javaNetUrl = url.url()); in url()
59 return result != null ? result : (javaNetUri = url.uri()); in uri()
66 return url.toString(); in urlString()
107 return url.isHttps(); in isHttps()
114 + url in toString()
121 private HttpUrl url; field in Request.Builder
[all …]
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DHttpUrlTest.java486 HttpUrl url = HttpUrl.parse("http://host/#Σ"); in fragmentNonAscii() local
487 assertEquals("http://host/#Σ", url.toString()); in fragmentNonAscii()
488 assertEquals("Σ", url.fragment()); in fragmentNonAscii()
489 assertEquals("Σ", url.encodedFragment()); in fragmentNonAscii()
490 assertEquals("http://host/#Σ", url.uri().toString()); in fragmentNonAscii()
494 HttpUrl url = HttpUrl.parse("http://host/#\u0080"); in fragmentNonAsciiThatOffendsJavaNetUri() local
495 assertEquals("http://host/#\u0080", url.toString()); in fragmentNonAsciiThatOffendsJavaNetUri()
496 assertEquals("\u0080", url.fragment()); in fragmentNonAsciiThatOffendsJavaNetUri()
497 assertEquals("\u0080", url.encodedFragment()); in fragmentNonAsciiThatOffendsJavaNetUri()
498 assertEquals(new URI("http://host/#"), url.uri()); // Control characters may be stripped! in fragmentNonAsciiThatOffendsJavaNetUri()
[all …]
DCacheTest.java176 .url(server.url("/")) in assertCached()
219 Request request = new Request.Builder().url(server.url("/")).build(); in testResponseCaching()
256 Request request = new Request.Builder().url(server.url("/")).build(); in secureResponseCaching()
295 Request request = new Request.Builder().url(server.url("/")).build(); in responseCachingAndRedirects()
317 Request request1 = new Request.Builder().url(server.url("/foo")).build(); in redirectToCachedResult()
324 Request request2 = new Request.Builder().url(server.url("/bar")).build(); in redirectToCachedResult()
332 Request request3 = new Request.Builder().url(server.url("/baz")).build(); in redirectToCachedResult()
357 Response response1 = get(server.url("/")); in secureResponseCachingAndRedirects()
362 Response response2 = get(server.url("/")); in secureResponseCachingAndRedirects()
392 .addHeader("Location: " + server2.url("/"))); in secureResponseCachingAndProtocolRedirects()
[all …]
DCallTest.java114 .url(server.url("/")) in get()
134 HttpUrl httpUrl = server.url("/"); in buildRequestUsingHttpUrl()
136 .url(httpUrl) in buildRequestUsingHttpUrl()
146 requestBuilder.url("ftp://hostname/path"); in invalidScheme()
156 requestBuilder.url("http://localhost:65536/"); in invalidPort()
167 .url(server.url("/")) in getReturns500()
196 .url(server.url("/")) in repeatedHeaderNames()
233 .url(server.url("/")) in head()
268 .url(server.url("/")) in post()
302 .url(server.url("/")) in postZeroLength()
[all …]
DWebPlatformUrlTest.java97 HttpUrl url; in testHttpUrl() local
99 url = HttpUrl.parse(testData.input); in testHttpUrl()
102 url = baseUrl.resolve(testData.input); in testHttpUrl()
106 assertNull("Expected URL to fail parsing", url); in testHttpUrl()
108 assertNotNull("Expected URL to parse successfully, but was null", url); in testHttpUrl()
109 String effectivePort = url.port() != HttpUrl.defaultPort(url.scheme()) in testHttpUrl()
110 ? Integer.toString(url.port()) in testHttpUrl()
112 String effectiveQuery = url.encodedQuery() != null ? "?" + url.encodedQuery() : ""; in testHttpUrl()
113 String effectiveFragment = url.encodedFragment() != null ? "#" + url.encodedFragment() : ""; in testHttpUrl()
114 String effectiveHost = url.host().contains(":") in testHttpUrl()
[all …]
DConnectionReuseTest.java45 .url(server.url("/")) in connectionsAreReused()
56 .url(server.url("/")) in connectionsAreReusedWithHttp2()
66 .url(server.url("/")) in connectionsAreNotReusedWithRequestConnectionClose()
70 .url(server.url("/")) in connectionsAreNotReusedWithRequestConnectionClose()
82 .url(server.url("/")) in connectionsAreNotReusedWithResponseConnectionClose()
85 .url(server.url("/")) in connectionsAreNotReusedWithResponseConnectionClose()
98 .url(server.url("/")) in connectionsAreNotReusedWithUnknownLengthResponseBody()
109 .url(server.url("/")) in connectionsAreNotReusedIfPoolIsSizeZero()
123 .url(server.url("/")) in connectionsReusedWithRedirectEvenIfPoolIsSizeZero()
141 .url(server.url("/")) in connectionsNotReusedWithRedirectIfDiscardingResponseIsSlow()
[all …]
/external/python/cpython2/Tools/webchecker/
Dwebchecker.py310 for url in self.bad.keys():
311 self.markerror(url)
331 url = urlparse.urljoin(root, "/robots.txt")
333 self.note(2, "Parsing %s", url)
335 rp.set_url(url)
339 self.note(1, "I/O error parsing %s: %s", url, msg)
348 for url in urls:
349 self.dopage(url)
383 for url, rawlink, msg in triples:
384 if rawlink != self.format_url(url): s = " (%s)" % rawlink
[all …]
/external/skia/tools/skiaserve/urlhandlers/
DUrlHandler.h18 virtual bool canHandle(const char* method, const char* url) = 0;
20 const char* url, const char* method,
26 bool canHandle(const char* method, const char* url) override;
28 const char* url, const char* method,
34 bool canHandle(const char* method, const char* url) override;
36 const char* url, const char* method,
42 bool canHandle(const char* method, const char* url) override;
44 const char* url, const char* method,
54 bool canHandle(const char* method, const char* url) override;
56 const char* url, const char* method,
[all …]
/external/guava/guava/src/com/google/common/io/
DResources.java55 public static ByteSource asByteSource(URL url) { in asByteSource() argument
56 return new UrlByteSource(url); in asByteSource()
64 private final URL url; field in Resources.UrlByteSource
66 private UrlByteSource(URL url) { in UrlByteSource() argument
67 this.url = checkNotNull(url); in UrlByteSource()
72 return url.openStream(); in openStream()
77 return "Resources.asByteSource(" + url + ")"; in toString()
87 public static CharSource asCharSource(URL url, Charset charset) { in asCharSource() argument
88 return asByteSource(url).asCharSource(charset); in asCharSource()
98 public static byte[] toByteArray(URL url) throws IOException { in toByteArray() argument
[all …]
/external/ksoap2/ksoap2-base/src/main/java/org/ksoap2/transport/
DTransport.java48 protected String url; field in Transport
67 public Transport(String url) { in Transport() argument
68 this(null, url); in Transport()
71 public Transport(String url, int timeout) { in Transport() argument
72 this.url = url; in Transport()
76 public Transport(String url, int timeout, int bufferLength) { in Transport() argument
77 this.url = url; in Transport()
90 public Transport(Proxy proxy, String url) { in Transport() argument
92 this.url = url; in Transport()
95 public Transport(Proxy proxy, String url, int timeout) { in Transport() argument
[all …]
/external/libmicrohttpd/src/testcurl/
Dtest_long_header.c70 const char *url, in ahc_echo() argument
82 response = MHD_create_response_from_buffer (strlen (url), in ahc_echo()
83 (void *) url, in ahc_echo()
98 char *url; in testLongUrlGet() local
115 url = malloc (VERY_LONG); in testLongUrlGet()
116 if (url == NULL) in testLongUrlGet()
121 memset (url, 'a', VERY_LONG); in testLongUrlGet()
122 url[VERY_LONG - 1] = '\0'; in testLongUrlGet()
123 memcpy (url, "http://127.0.0.1:1080/", strlen ("http://127.0.0.1:1080/")); in testLongUrlGet()
124 curl_easy_setopt (c, CURLOPT_URL, url); in testLongUrlGet()
[all …]
/external/curl/src/
Dtool_operhlp.c45 Curl_safefree(node->url); in clean_getout()
54 bool output_expected(const char *url, const char *uploadfile) in output_expected() argument
58 if(checkprefix("http://", url) || checkprefix("https://", url)) in output_expected()
74 char *add_file_name_to_url(CURL *curl, char *url, const char *filename) in add_file_name_to_url() argument
77 char *ptr = strstr(url, "://"); in add_file_name_to_url()
81 ptr = url; in add_file_name_to_url()
107 urlbuffer = aprintf("%s%s", url, encfile); in add_file_name_to_url()
110 urlbuffer = aprintf("%s/%s", url, encfile); in add_file_name_to_url()
113 Curl_safefree(url); in add_file_name_to_url()
118 url = urlbuffer; /* use our new URL instead! */ in add_file_name_to_url()
[all …]
/external/toybox/toys/pending/
Dwget.c29 static unsigned get_hn(const char *url, char *hostname) {
32 for (i = 0; url[i] != '\0' && url[i] != ':' && url[i] != '/'; i++) {
34 hostname[i] = url[i];
42 static unsigned get_port(const char *url, char *port, unsigned url_i) { in get_port() argument
45 for (i = 0; url[i] != '\0' && url[i] != '/'; i++, url_i++) { in get_port()
46 if('0' <= url[i] && url[i] <= '9') port[i] = url[i]; in get_port()
56 static void get_info(const char *url, char* hostname, char *port, char *path) { in get_info() argument
59 if (strncmp(url, "http://", i)) error_exit("only HTTP support"); in get_info()
60 len = get_hn(url+i, hostname); in get_info()
64 if (url[i] == ':') { in get_info()
[all …]
/external/libbrillo/brillo/http/
Dhttp_utils.cc24 std::unique_ptr<Response> GetAndBlock(const std::string& url, in GetAndBlock() argument
29 request_type::kGet, url, headers, transport, error); in GetAndBlock()
32 RequestID Get(const std::string& url, in Get() argument
38 url, in Get()
45 std::unique_ptr<Response> HeadAndBlock(const std::string& url, in HeadAndBlock() argument
49 request_type::kHead, url, {}, transport, error); in HeadAndBlock()
52 RequestID Head(const std::string& url, in Head() argument
57 url, in Head()
64 std::unique_ptr<Response> PostTextAndBlock(const std::string& url, in PostTextAndBlock() argument
71 url, data.data(), data.size(), mime_type, headers, transport, error); in PostTextAndBlock()
[all …]
/external/python/cpython2/Lib/test/
Dtest_robotparser.py12 def __init__(self, index, parser, url, good, agent): argument
15 self.str = "RobotTest(%d, good, %s)" % (index, url)
17 self.str = "RobotTest(%d, bad, %s)" % (index, url)
19 self.url = url
24 if isinstance(self.url, tuple):
25 agent, url = self.url
27 url = self.url
30 self.assertTrue(self.parser.can_fetch(agent, url))
32 self.assertFalse(self.parser.can_fetch(agent, url))
45 for url in good_urls:
[all …]
Dtest_urllib2net.py175 url = "http://www.example.com"
176 with test_support.transient_internet(url):
178 request = urllib2.Request(url)
206 for url in urls:
207 if isinstance(url, tuple):
208 url, req, expected_err = url
211 with test_support.transient_internet(url):
212 debug(url)
214 f = urlopen(url, req, TIMEOUT)
219 (expected_err, url, req, type(err), err))
[all …]
/external/libmicrohttpd/src/testzzuf/
Dtest_long_header.c72 const char *url, in ahc_echo() argument
84 response = MHD_create_response_from_buffer (strlen (url), in ahc_echo()
85 (void *) url, in ahc_echo()
100 char *url; in testLongUrlGet() local
123 url = malloc (VERY_LONG); in testLongUrlGet()
124 memset (url, 'a', VERY_LONG); in testLongUrlGet()
125 url[VERY_LONG - 1] = '\0'; in testLongUrlGet()
126 memcpy (url, "http://localhost:11081/", in testLongUrlGet()
128 curl_easy_setopt (c, CURLOPT_URL, url); in testLongUrlGet()
149 free (url); in testLongUrlGet()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/model/
DGlideUrl.java25 private final URL url; field in GlideUrl
30 public GlideUrl(URL url) { in GlideUrl() argument
31 if (url == null) { in GlideUrl()
34 this.url = url; in GlideUrl()
38 public GlideUrl(String url) { in GlideUrl() argument
39 if (TextUtils.isEmpty(url)) { in GlideUrl()
40 throw new IllegalArgumentException("String url must not be empty or null: " + url); in GlideUrl()
42 this.stringUrl = url; in GlideUrl()
43 this.url = null; in GlideUrl()
68 stringUrl = url.toString(); in toString()

12345678910>>...49