Lines Matching defs:url
5 #include "http-url.h"
9 const char *url;
20 .url = "http://localhost",
24 .url = "http://www.%65%78%61%6d%70%6c%65.com",
28 .url = "http://www.dovecot.org:8080",
33 .url = "http://127.0.0.1",
39 .url = "http://[::1]",
45 .url = "http://[::1]:8080",
52 .url = "http://user@api.dovecot.org",
58 .url = "http://userid:secret@api.dovecot.org",
64 .url = "http://su%3auserid:secret@api.dovecot.org",
70 .url = "http://www.example.com/"
85 .url = "http://256.0.0.1/that/reverts/to/DNS",
91 .url = "http://127.0.0.284/this/also/reverts/to/DNS",
97 .url = "http://www.example.com/#Status%20of%20development",
116 .url = "g",
120 .url = "./g",
124 .url = "g/",
128 .url = "/g",
132 .url = "//g",
136 .url = "?y",
140 .url = "g?y",
144 .url = "#s",
150 .url = "g#s",
156 .url = "g?y#s",
162 .url = ";x",
166 .url = "g;x",
171 .url = "g;x?y#s",
177 .url = "",
181 .url = ".",
185 .url = "./",
189 .url = "..",
193 .url = "../",
197 .url = "../g",
201 .url = "../..",
205 .url = "../../",
209 .url = "../../g",
216 .url = "../../../g",
220 .url = "../../../../g",
224 .url = "/./g",
228 .url = "/../g",
232 .url = "g.",
236 .url = ".g",
240 .url = "g..",
244 .url = "..g",
248 .url = "./../g",
252 .url = "./g/.",
256 .url = "g/./h",
260 .url = "g/../h",
264 .url = "g;x=1/./y",
268 .url = "g;x=1/../y",
272 .url = "g?y/./x",
276 .url = "g?y/../x",
280 .url = "g#s/./x",
286 .url = "g#s/../x",
301 const char *url = valid_url_tests[i].url;
308 test_begin(t_strdup_printf("http url valid [%d]", i));
311 if (http_url_parse(url, urlb, flags, pool_datastack_create(), &urlp, &error) < 0)
315 valid_url_tests[i].url), urlp != NULL, error);
356 const char *url;
363 .url = "imap://example.com/INBOX"
365 .url = "http:/www.example.com"
367 .url = ""
369 .url = "/index.html"
371 .url = "http://www.example.com/index.html\""
373 .url = "http:///dovecot.org"
375 .url = "http://[]/index.html"
377 .url = "http://[v08.234:232:234:234:2221]/index.html"
379 .url = "http://[1::34a:34:234::6]/index.html"
381 .url = "http://example%a.com/index.html"
383 .url = "http://example.com%/index.html"
385 .url = "http://example%00.com/index.html"
387 .url = "http://example.com:65536/index.html"
389 .url = "http://example.com:72817/index.html"
391 .url = "http://example.com/settings/%00/"
393 .url = "http://example.com/settings/%0r/"
395 .url = "http://example.com/settings/misc/%/"
397 .url = "http://example.com/?%00"
399 .url = "http://www.example.com/network.html#IMAP_Server"
401 .url = "http://example.com/#%00",
413 const char *url = invalid_url_tests[i].url;
422 test_begin(t_strdup_printf("http url invalid [%d]", i));
424 if (http_url_parse(url, urlb, flags,
427 test_out_reason(t_strdup_printf("parse %s", url), urlp == NULL, error);
454 const char *url = parse_create_url_tests[i];
458 test_begin(t_strdup_printf("http url parse/create [%d]", i));
461 (url, NULL, HTTP_URL_ALLOW_FRAGMENT_PART,
464 test_out_reason(t_strdup_printf("parse %s", url), urlp != NULL, error);
468 ("create %s", urlnew), strcmp(url, urlnew) == 0);