Lines Matching +full:host +full:- +full:g
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 #include "test-utils.h"
15 { "ftp://user@host/path", "ftp://user@host/path", NULL,
16 { "ftp", "user", NULL, "host", 21, "/path", NULL, NULL } },
17 { "ftp://user@host:9999/path", "ftp://user@host:9999/path", NULL,
18 { "ftp", "user", NULL, "host", 9999, "/path", NULL, NULL } },
19 { "ftp://user:password@host/path", "ftp://user@host/path", NULL,
20 { "ftp", "user", "password", "host", 21, "/path", NULL, NULL } },
21 { "ftp://user:password@host:9999/path", "ftp://user@host:9999/path", NULL,
22 { "ftp", "user", "password", "host", 9999, "/path", NULL, NULL } },
23 { "ftp://user:password@host", "ftp://user@host", NULL,
24 { "ftp", "user", "password", "host", 21, "", NULL, NULL } },
25 { "http://us%65r@host", "http://user@host/", NULL,
26 { "http", "user", NULL, "host", 80, "/", NULL, NULL } },
27 { "http://us%40r@host", "http://us%40r@host/", NULL,
28 { "http", "us\x40r", NULL, "host", 80, "/", NULL, NULL } },
29 { "http://us%3ar@host", "http://us%3Ar@host/", NULL,
30 { "http", "us\x3ar", NULL, "host", 80, "/", NULL, NULL } },
31 { "http://us%2fr@host", "http://us%2Fr@host/", NULL,
32 { "http", "us\x2fr", NULL, "host", 80, "/", NULL, NULL } },
33 { "http://us%3fr@host", "http://us%3Fr@host/", NULL,
34 { "http", "us\x3fr", NULL, "host", 80, "/", NULL, NULL } },
35 { "http://host?query", "http://host/?query", NULL,
36 { "http", NULL, NULL, "host", 80, "/", "query", NULL } },
37 { "http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fchildparam%3Dchildvalue¶m=value",
38 "http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fchildparam%3Dchildvalue¶m=value", NULL,
39 …{ "http", NULL, NULL, "host", 80, "/path", "query=http%3A%2F%2Fhost%2Fpath%3Fchildparam%3Dchildval…
40 …{ "http://control-chars/%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%1…
41 …"http://control-chars/%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%…
42 …{ "http", NULL, NULL, "control-chars", 80, "/%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%1…
49 { "http://unwise-chars/%7B%7D%7C%5C%5E%5B%5D%60",
50 "http://unwise-chars/%7B%7D%7C%5C%5E%5B%5D%60", NULL,
51 { "http", NULL, NULL, "unwise-chars", 80, "/%7B%7D%7C%5C%5E%5B%5D%60", NULL, NULL } },
77 { "http://host/path with spaces",
78 "http://host/path%20with%20spaces", "566530",
79 { "http", NULL, NULL, "host", 80, "/path%20with%20spaces", NULL, NULL } },
80 { " http://host/path", "http://host/path", "594405",
81 { "http", NULL, NULL, "host", 80, "/path", NULL, NULL } },
82 { "http://host/path ", "http://host/path", "594405",
83 { "http", NULL, NULL, "host", 80, "/path", NULL, NULL } },
84 { "http://host ", "http://host/", "594405",
85 { "http", NULL, NULL, "host", 80, "/", NULL, NULL } },
86 { "http://host:999 ", "http://host:999/", "594405",
87 { "http", NULL, NULL, "host", 999, "/", NULL, NULL } },
88 { "http://host/pa\nth", "http://host/path", "594405",
89 { "http", NULL, NULL, "host", 80, "/path", NULL, NULL } },
90 { "http:\r\n//host/path", "http://host/path", "594405",
91 { "http", NULL, NULL, "host", 80, "/path", NULL, NULL } },
92 { "http://\thost/path", "http://host/path", "594405",
93 { "http", NULL, NULL, "host", 80, "/path", NULL, NULL } },
95 /* 0-length is different from not-present */
96 { "http://host/path?", "http://host/path?", "594405",
97 { "http", NULL, NULL, "host", 80, "/path", "", NULL } },
98 { "http://host/path#", "http://host/path#", "594405",
99 { "http", NULL, NULL, "host", 80, "/path", NULL, "" } },
101 /* ignore bad %-encoding */
102 { "http://host/path%", "http://host/path%", "590524",
103 { "http", NULL, NULL, "host", 80, "/path%", NULL, NULL } },
106 { "http://host/path%%", "http://host/path%%", "590524",
107 { "http", NULL, NULL, "host", 80, "/path%%", NULL, NULL } },
108 { "http://host/path%%%", "http://host/path%%%", "590524",
109 { "http", NULL, NULL, "host", 80, "/path%%%", NULL, NULL } },
110 { "http://host/path%/x/", "http://host/path%/x/", "590524",
111 { "http", NULL, NULL, "host", 80, "/path%/x/", NULL, NULL } },
112 { "http://host/path%0x/", "http://host/path%0x/", "590524",
113 { "http", NULL, NULL, "host", 80, "/path%0x/", NULL, NULL } },
114 { "http://host/path%ax", "http://host/path%ax", "590524",
115 { "http", NULL, NULL, "host", 80, "/path%ax", NULL, NULL } },
117 /* %-encode non-ASCII characters */
118 { "http://host/p\xc3\xa4th/", "http://host/p%C3%A4th/", "662806",
119 { "http", NULL, NULL, "host", 80, "/p%C3%A4th/", NULL, NULL } },
124 { "http://@host", "http://@host/", NULL,
125 { "http", "", NULL, "host", 80, "/", NULL, NULL } },
126 { "http://:@host", "http://@host/", NULL,
127 { "http", "", "", "host", 80, "/", NULL, NULL } },
129 { "http://host/keep%00nuls", "http://host/keep%00nuls", NULL,
130 { "http", NULL, NULL, "host", 80, "/keep%00nuls", NULL, NULL } },
133 { "foo0://host/path", "foo0://host/path", "703776",
134 { "foo0", NULL, NULL, "host", 0, "/path", NULL, NULL } },
135 { "f0.o://host/path", "f0.o://host/path", "703776",
136 { "f0.o", NULL, NULL, "host", 0, "/path", NULL, NULL } },
137 { "http++://host/path", "http++://host/path", "703776",
138 { "http++", NULL, NULL, "host", 0, "/path", NULL, NULL } },
139 { "http-ish://host/path", "http-ish://host/path", "703776",
140 { "http-ish", NULL, NULL, "host", 0, "/path", NULL, NULL } },
141 { "99http://host/path", NULL, "703776",
143 { ".http://host/path", NULL, "703776",
145 { "+http://host/path", NULL, "703776",
168 { "g:h", "g:h",
169 { "g", NULL, NULL, NULL, 0, "h", NULL, NULL } },
170 { "g", "http://a/b/c/g",
171 { "http", NULL, NULL, "a", 80, "/b/c/g", NULL, NULL } },
172 { "./g", "http://a/b/c/g",
173 { "http", NULL, NULL, "a", 80, "/b/c/g", NULL, NULL } },
174 { "g/", "http://a/b/c/g/",
175 { "http", NULL, NULL, "a", 80, "/b/c/g/", NULL, NULL } },
176 { "/g", "http://a/g",
177 { "http", NULL, NULL, "a", 80, "/g", NULL, NULL } },
178 { "//g", "http://g/",
179 { "http", NULL, NULL, "g", 80, "/", NULL, NULL } },
182 { "g?y", "http://a/b/c/g?y",
183 { "http", NULL, NULL, "a", 80, "/b/c/g", "y", NULL } },
186 { "g#s", "http://a/b/c/g#s",
187 { "http", NULL, NULL, "a", 80, "/b/c/g", NULL, "s" } },
188 { "g?y#s", "http://a/b/c/g?y#s",
189 { "http", NULL, NULL, "a", 80, "/b/c/g", "y", "s" } },
192 { "g;x", "http://a/b/c/g;x",
193 { "http", NULL, NULL, "a", 80, "/b/c/g;x", NULL, NULL } },
194 { "g;x?y#s", "http://a/b/c/g;x?y#s",
195 { "http", NULL, NULL, "a", 80, "/b/c/g;x", "y", "s" } },
204 { "../g", "http://a/b/g",
205 { "http", NULL, NULL, "a", 80, "/b/g", NULL, NULL } },
210 { "../../g", "http://a/g",
211 { "http", NULL, NULL, "a", 80, "/g", NULL, NULL } },
214 { "../../../g", "http://a/g",
215 { "http", NULL, NULL, "a", 80, "/g", NULL, NULL } },
216 { "../../../../g", "http://a/g",
217 { "http", NULL, NULL, "a", 80, "/g", NULL, NULL } },
218 { "/./g", "http://a/g",
219 { "http", NULL, NULL, "a", 80, "/g", NULL, NULL } },
220 { "/../g", "http://a/g",
221 { "http", NULL, NULL, "a", 80, "/g", NULL, NULL } },
222 { "g.", "http://a/b/c/g.",
223 { "http", NULL, NULL, "a", 80, "/b/c/g.", NULL, NULL } },
224 { ".g", "http://a/b/c/.g",
225 { "http", NULL, NULL, "a", 80, "/b/c/.g", NULL, NULL } },
226 { "g..", "http://a/b/c/g..",
227 { "http", NULL, NULL, "a", 80, "/b/c/g..", NULL, NULL } },
228 { "..g", "http://a/b/c/..g",
229 { "http", NULL, NULL, "a", 80, "/b/c/..g", NULL, NULL } },
230 { "./../g", "http://a/b/g",
231 { "http", NULL, NULL, "a", 80, "/b/g", NULL, NULL } },
232 { "./g/.", "http://a/b/c/g/",
233 { "http", NULL, NULL, "a", 80, "/b/c/g/", NULL, NULL } },
234 { "g/./h", "http://a/b/c/g/h",
235 { "http", NULL, NULL, "a", 80, "/b/c/g/h", NULL, NULL } },
236 { "g/../h", "http://a/b/c/h",
238 { "g;x=1/./y", "http://a/b/c/g;x=1/y",
239 { "http", NULL, NULL, "a", 80, "/b/c/g;x=1/y", NULL, NULL } },
240 { "g;x=1/../y", "http://a/b/c/y",
242 { "g?y/./x", "http://a/b/c/g?y/./x",
243 { "http", NULL, NULL, "a", 80, "/b/c/g", "y/./x", NULL } },
244 { "g?y/../x", "http://a/b/c/g?y/../x",
245 { "http", NULL, NULL, "a", 80, "/b/c/g", "y/../x", NULL } },
246 { "g#s/./x", "http://a/b/c/g#s/./x",
247 { "http", NULL, NULL, "a", 80, "/b/c/g", NULL, "s/./x" } },
248 { "g#s/../x", "http://a/b/c/g#s/../x",
249 { "http", NULL, NULL, "a", 80, "/b/c/g", NULL, "s/../x" } },
252 * a relative URL ("http://a/b/c/g"), but it should be
255 * an http URL with no host.
257 { "http:g", NULL, { NULL } }
297 g_assert_cmpstr (uri->scheme, ==, bits->scheme); in do_uri()
298 g_assert_cmpstr (uri->user, ==, bits->user); in do_uri()
299 g_assert_cmpstr (uri->password, ==, bits->password); in do_uri()
300 g_assert_cmpstr (uri->host, ==, bits->host); in do_uri()
301 g_assert_cmpuint (uri->port, ==, bits->port); in do_uri()
302 g_assert_cmpstr (uri->path, ==, bits->path); in do_uri()
303 g_assert_cmpstr (uri->query, ==, bits->query); in do_uri()
304 g_assert_cmpstr (uri->fragment, ==, bits->fragment); in do_uri()
447 g_assert_cmpstr (uri->path, ==, ""); in do_soup_uri_null_tests()
511 { "data:text/plain;charset=utf-8,foo%20bar",
512 "text/plain;charset=utf-8",
518 "text/plain;charset=US-ASCII",
521 "text/plain;charset=US-ASCII",
524 "text/plain;charset=US-ASCII",