bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#include "test-lib.h"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#include "test-common.h"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#include "str-sanitize.h"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#include "uri-util.h"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch/* Valid uri tests */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschconst char *valid_uri_tests[] = {
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://127.0.0.1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org/frop",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org/frop%20frop",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org/frop/frop",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org/frop/frop?query",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org?query",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.dovecot.org?query&query",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:frop@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch};
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschunsigned int valid_uri_test_count = N_ELEMENTS(valid_uri_tests);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschstatic void test_uri_valid(void)
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch{
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch unsigned int i;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_begin("uri valid");
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch for (i = 0; i < valid_uri_test_count; i++) T_BEGIN {
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch const char *uri_in, *error = NULL;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch int ret;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch uri_in = valid_uri_tests[i];
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ret = uri_check(uri_in, 0, &error);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_out_quiet(
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch t_strdup_printf("parse [%u] <%s>", i, str_sanitize(uri_in, 64)),
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ret >= 0);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch } T_END;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_end();
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch}
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch/* Invalid uri tests */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschconst char *invalid_uri_tests[] = {
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http$44",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "/index.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap:[",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://[",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "frop://friep\"",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://example.com/settings/%00/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://[]/index.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://example.com:65536/index.html"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch};
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschunsigned int invalid_uri_test_count = N_ELEMENTS(invalid_uri_tests);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschstatic void test_uri_invalid(void)
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch{
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch unsigned int i;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_begin("uri invalid");
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch for (i = 0; i < invalid_uri_test_count; i++) T_BEGIN {
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch const char *uri_in, *error = NULL;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch int ret;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch uri_in = invalid_uri_tests[i];
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ret = uri_check(uri_in, 0, &error);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_out_quiet(
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch t_strdup_printf("parse [%u] <%s>", i, str_sanitize(uri_in, 64)),
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ret < 0);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch } T_END;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_end();
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch}
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch/* RFC uri tests */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschconst char *rfc_uri_tests[] = {
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 1738 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.acl.lanl.gov/URI/archive/uri-archive.index.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "file://vms.host.edu/disk$user/my/notes/note12345.txt",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://@host.com/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://host.com/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://foo:@host.com/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://myname@host.dom/%2Fetc/motd",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://myname@host.dom/etc/motd",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://myname@host.dom//etc/motd",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://info.cern.ch/pub/www/doc;type=d",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://ds.internic.net/instructions/overview.html#WARNING",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2056 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "z39.50s://melvyl.ucop.edu/cat",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "z39.50r://melvyl.ucop.edu/mags?elecworld.v30.n19",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "z39.50r://cnidr.org:2100/tmf?bkirch_rules__a1;esn=f;rs=marc",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2122 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "vemmi://zeus.mctel.fr/demo",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "vemmi://zeus.mctel.fr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "vemmi://zeus.mctel.fr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "vemmi://mctel.fr/demo;$USERDATA=smith;account=1234",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "vemmi://ares.mctel.fr/TEST",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2141 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "URN:foo:a123,456",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "urn:foo:a123,456",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "urn:FOO:a123,456",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "urn:foo:A123,456",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "urn:foo:a123%2C456",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "URN:FOO:a123%2c456",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2224 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nfs://server/d/e/f",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nfs://server//a/b/c/d/e/f",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nfs://server/a/b",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2229 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:shortcake:",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:shortcake:*",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:shortcake:wordnet:",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:shortcake:wordnet:1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:abcdefgh",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:sun",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/d:sun::1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/m:sun",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/m:sun::soundex",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/m:sun:wordnet::1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/m:sun::soundex:1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dict://dict.org/m:sun:::",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2326 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://media.example.com:554/twister/audiotrack",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://media.example.com:554/twister",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/fizzle/foo",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://example.com/foo/bar/baz.rm",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://audio.example.com/audio",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://audio.example.com/twister.en",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://audio.example.com/meeting.en",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://example.com/fizzle/foo",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://bigserver.com:8001",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://example.com/meeting/audio.en",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://foo.com/bar.file",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://foo.com/bar.avi/streamid=0;seq=45102",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://foo.com/bar.avi/streamid=1;seq=30211",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://audio.example.com/twister/audio.en",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://video.example.com/twister/video",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://video.example.com/twister/video;seq=12312232;rtptime=78712811",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://audio.example.com/twister/audio.en;seq=876655;rtptime=1032181",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://foo/twister/video;seq=9810092;rtptime=3450012",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://foo.com/test.wav/streamid=0;seq=981888;rtptime=3781123",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/demo/548/sound",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/demo/548/sound",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/meeting",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/meeting/audiotrack",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/meeting/videotrack",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://server.example.com/meeting",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://example.com/movie/trackID=1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "rtsp://media.example.com:554/twister",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2371 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tip://123.123.123.123/?urn:xopen:xid",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tip://123.123.123.123/?transid1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2384 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pop://rg@mailsrv.qualcomm.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pop://rg;AUTH=+APOP@mail.eudora.com:8110",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pop://baz;AUTH=SCRAM-MD5@foo.bar",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2392 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mid:960830.1639@XIson.com/partA.960830.1639@XIson.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cid:foo4%25foo1@bar.net",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cid:foo4*foo1@bar.net",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2397 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "data:,A%20brief%20note",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "hhx4dbgYKAAA7",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#if 0 // this one doesn't comply with RFC 3986
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "data:text/plain;charset=iso-8859-7,%be%fg%be",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#endif
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "data:application/vnd-xxx-query,select_vcount,fcol_from_fieldtable/local",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 2838 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:wqed.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:nbc.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:abc.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:abc.co.au",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:east.hbo.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tv:west.hbo.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3261 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#if 0 // these don't comply with RFC 3986
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+1-212-555-1212:1234@gateway.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+12125551212@server.phone2net.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+12125551212@server.phone2net.com;tag=887s",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+358-555-1234567@foo.com;postd=pp22;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+358-555-1234567;isub=1411;postd=pp22@foo.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+358-555-1234567;phone-context=5;tsp=a.b@foo.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+358-555-1234567;postd=pp22@foo.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+358-555-1234567;POSTD=PP22@foo.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:+358-555-1234567;postd=pp22;isub=1411@foo.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:%61lice@atlanta.com;transport=TCPv",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:agb@bell-telephone.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@192.0.2.4v",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@atlanta.covm",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@atlanta.com?priority=urgent&subject=project%20x",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@atlanta.com?subject=project%20x&priority=urgent",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@AtLanTa.CoM;Transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@AtLanTa.CoM;Transport=UDP",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "SIP:ALICE@AtLanTa.CoM;Transport=udp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice;day=tuesday@atlanta.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice@pc33.atlanta.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:alice:secretword@atlanta.com;transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:anonymous@anonymizer.invalid",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:atlanta.com;method=REGISTER?to=alice%40atlanta.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bigbox3.site3.atlanta.com;lr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:biloxi.com;method=REGISTER;transport=tcp?to=sip:bob%40biloxi.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:biloxi.com;transport=tcp;method=REGISTER?to=sip:bob%40biloxi.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@192.0.2.4",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@biloxi.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@biloxi.com:5060",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@biloxi.com:6000;transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@biloxi.com;transport=udp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@engineering.biloxi.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:bob@phone21.boxesbybob.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:c8oqz84zk7z@privacy.org>;tag=hyh8",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:callee@domain.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:callee@gateway.leftprivatespace.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:callee@u2.domain.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:callee@u2.rightprivatespace.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:caller@u1.example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com;security=off",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com;security=on",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com;newparam=5",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com;security=off",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com;security=on",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@chicago.com?Subject=next%20meeting",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:carol@cube2214a.chicago.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:chicago.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:not-in-service-recording@atlanta.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:operator@cs.columbia.edu",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:p1.domain.com;lr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:p1.example.com;lr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:p2.domain.com;lr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sips:1212@gateway.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sips:+358-555-1234567@foo.com;postd=pp22;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sips:+358-555-1234567;postd=pp22@foo.com;user=phone",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sips:alice@atlanta.com?subject=project%20x&priority=urgent",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:server10.biloxi.com;lr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:ss1.carrier.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:user@host?Subject=foo&Call-Info=<http://www.foo.com>",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:watson@bell-telephone.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sip:watson@worcester.bell-telephone.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#endif
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3368 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "go:Mercedes%20Benz",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "go://?Mercedes%20Benz",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "go://cnrp.foo.com?Mercedes%20Benz;geography=US-ga",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "go://cnrp.foo.org?Martin%20J.%20D%C3%BCrst",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "go://cnrp.foo.com?id=5432345",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3507 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "icap://icap.example.net:2000/services/icap-service-1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "icap://icap.net/service?mode=translate&lang=french",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "icap://icap.example.net/translate?mode=french",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "icap://icap-server.net/server?arg=87",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "icap://icap.example.org/satisf",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "icap://icap.server.net/sample-service",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3510 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer/tiger",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer/fox",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer/tiger/bob",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer/tiger/ira",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/~smith/printer",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com:631/~smith/printer",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer/123",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipp://example.com/printer/tiger/job123",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3529 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmlrpc.beep://stateserver.example.com/NumberToName",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmlrpc.beep://stateserver.example.com:1026",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmlrpc.beep://stateserver.example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmlrpc.beep://10.0.0.2:1026",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmlrpc.beeps://stateserver.example.com/NumberToName",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3617 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tftp://example.com/myconfigurationfile;mode=netascii",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tftp://example.com/mystartupfile",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3859 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pres:fred@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3860 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "im:fred@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "im:pepp=example.com/fred@relay-domain",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3966 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tel:+1-201-555-0123",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tel:7042;phone-context=example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tel:863-1234;phone-context=+1-914-555",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3981 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//example.com/local/myhosts",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//com/iris/id",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//example.com/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//com/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1//192.0.2.1:44/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris.lwz:dreg1//192.0.2.1:44/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris.beep:dreg1//com/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris:dreg1/bottom/example.com/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iris.beep:dreg1/bottom/example.com/domain/example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 3986 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ftp://ftp.is.co.za/rfc/rfc1808.txt",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.ietf.org/rfc/rfc2396.txt",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://[2001:db8::7]/c=GB?objectClass?one",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:John.Doe@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news:comp.infosystems.www.servers.unix",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tel:+1-816-555-1212",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "telnet://192.0.2.16:80/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4078 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "crid://example.com/foobar",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "crid://example.co.jp/%E3%82%A8%E3%82%A4%E3%82%AC",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4088 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://tester5@example.com:8161",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com/bridge1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com/bridge1;800002b804616263",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com//1.3.6.1.2.1.1.3.0",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com//1.3.6.1.2.1.1.3+",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com//1.3.6.1.2.1.1.3.*",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com/bridge1/1.3.6.1.2.1.2.2.1.8.*",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "snmp://example.com//(1.3.6.1.2.1.2.2.1.7,1.3.6.1.2.1.2.2.1.8).*",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4151 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tag:timothy@hpl.hp.com,2001:web/externalHome",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tag:sandro@w3.org,2004-05:Sandro",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tag:my-ids.com,2001-09-15:TimKindberg:presentations:UBath2004-05-19",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tag:blogger.com,1999:blog-555",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "tag:yaml.org,2002:int",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4227 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "soap.beep://stockquoteserver.example.com/StockQuote",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "soap.beep://stockquoteserver.example.com:1026",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "soap.beep://stockquoteserver.example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "soap.beep://192.0.2.0:1026",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4324 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://cal.example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://cal.example.com/Company/Holidays",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://cal.example.com/abcd1234Usr",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://cal.example.com/abcd1234USR",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://host.com/joe",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap:example.com/Doug",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://cal.example.com/sdfifgty4321",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://calendar.example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "cap://mycal.example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4452 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "info:ddc/22/eng//004.678",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "info:lccn/2002022641",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "info:sici/0363-0277(19950315)120:5%3C%3E1.0.TX;2-V",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "info:bibcode/2003Icar..163..263Z",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "info:pmid/12376099",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4501 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dns:www.example.org.?clAsS=IN;tYpE=A",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dns:www.example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dns:simon.example.org?type=CERT",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dns://192.168.1.1/ftp.example.org?type=A",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dns:world%20wide%20web.example%5c.domain.org?TYPE=TXT",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#if 0 // contains %00 encoding, which is currently always rejected
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "dns://fw.example.org/*.%20%00.example?type=TXT",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#endif
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4516 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap:///o=University%20of%20Michigan,c=US",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap1.example.net/o=University%20of%20Michigan,c=US",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap1.example.net/o=University%20of%20Michigan,"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "c=US?postalAddress",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap1.example.net:6666/o=University%20of%20Michigan,"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "c=US?\?sub?(cn=Babs%20Jensen)",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "LDAP://ldap1.example.com/c=GB?objectClass?ONE",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap2.example.com/o=Question%3f,c=US?mail",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap3.example.com/o=Babsco,c=US"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "??\?(four-octet=%5c00%5c00%5c00%5c04)",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap.example.net",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap.example.net/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap://ldap.example.net/?",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap:///?\?sub?\?e-bindname=cn=Manager%2cdc=example%2cdc=com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ldap:///?\?sub?\?!e-bindname=cn=Manager%2cdc=example%2cdc=com"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 4975 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://atlanta.example.com:7654/jshA7weztas;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://biloxi.example.com:12763/kjhd37s2s20w2a;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://host.example.com:8493/asfd34;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://alice.example.com:7394/2s93i9ek2a;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://bob.example.com:8493/si438dsaodes;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://alicepc.example.com:7777/iau39soe2843z;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://bob.example.com:8888/9di4eae923wzd;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://alice.example.com:7777/iau39soe2843z;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://bobpc.example.com:8888/9di4eae923wzd;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://alicepc.example.com:7654/iau39soe2843z;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://alicepc.example.com:8888/9di4eae923wzd;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://example.com:7777/iau39soe2843z;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "msrp://bob.example.com:8888/9di4eae923wzd;tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5092 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://michael@example.org/INBOX",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://bester@example.org/INBOX",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://joe@example.com/INBOX/;uid=20/;section=1.2;urlauth="
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "submit+fred:internal:91354a473744909de610943775f92038",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://minbari.example.org/gray-council;UIDVALIDITY=385759045/;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "UID=20/;PARTIAL=0.1024",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://psicorp.example.org/~peter/%E6%97%A5%E6%9C%AC%E8%AA%9E/"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "%E5%8F%B0%E5%8C%97",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://;AUTH=GSSAPI@minbari.example.org/gray-council/;uid=20/"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ";section=1.2",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://;AUTH=*@minbari.example.org/gray%20council?"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "SUBJECT%20shadows",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "imap://john;AUTH=*@minbari.example.org/babylon5/personel?"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "charset%20UTF-8%20SUBJECT%20%7B14+%7D%0D%0A%D0%98%D0%B2%"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "D0%B0%D0%BD%D0%BE%D0%B2%D0%B0",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5122 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:node@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp://guest@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:guest@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp://guest@example.com/support@example.com?message",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:support@example.com?message",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example-node@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example-node@example.com/some-resource",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example-node@example.com?message",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example-node@example.com?message;subject=Hello%20World",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example-node@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:example-node@example.com?query",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:nasty!%23$%25()*+,-.;=%3F%5B%5C%5D%5E_%60%7B%7C%7D~node@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:node@example.com/repulsive%20!%23%22$%25&'()*+,-.%2F:;%3C="
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "%3E%3F%40%5B%5C%5D%5E_%60%7B%7C%7D~resource",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "xmpp:ji%C5%99i@%C4%8Dechy.example/v%20Praze",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5456 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#if 0 // these don't comply with RFC 3986
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:example.com/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:example.com:4569/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:example.com:4570/alice?friends",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:192.0.2.4:4569/alice?friends",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:[2001:db8::1]:4569/alice?friends",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:example.com/12022561414",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:johnQ@example.com/12022561414",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:atlanta.com/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:AtLaNtA.com/ALicE",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:atlanta.com:4569/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:alice@atlanta.com/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:alice@AtLaNtA.com:4569/ALicE",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:ALICE@atlanta.com/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "iax:alice@atlanta.com/alice",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#endif
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5724 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sms:+15105550101",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sms:+15105550101,+15105550102",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sms:+15105550101?body=hello%20there",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5804 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sieve://example.com//script",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "sieve://example.com/script",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5538 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news://news.server.example/example.group.this",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news://news.server.example/*",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news://news.server.example/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news://wild.server.example/example.group.th%3Fse",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news:example.group.*",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news:example.group.this",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news://news.gmane.org/gmane.ietf.tools",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "news://news.gmane.org/p0624081dc30b8699bf9b@%5B10.20.30.108%5D",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nntp://wild.server.example/example.group.n%2Fa/12345",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nntp://news.server.example/example.group.this",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nntp://news.gmane.org/gmane.ietf.tools/742",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nntp://news.server.example/example.group.this/12345",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 5870 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:13.4125,103.8667",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:48.2010,16.3695,183",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:48.198634,16.371648;crs=wgs84;u=40",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:90,-22.43;crs=WGS84",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:90,46",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:22.300;-118.44",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:22.3;-118.4400",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:66,30;u=6.500;FOo=this%2dthat",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:66.0,30;u=6.5;foo=this-that",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:70,20;foo=1.00;bar=white",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:70,20;foo=1;bar=white",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:47,11;foo=blue;bar=white",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:47,11;bar=white;foo=blue",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:22,0;bar=Blue",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "geo:22,0;BAR=blue",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 6068 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:addr1@an.example,addr2@an.example",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:?to=addr1@an.example,addr2@an.example",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:addr1@an.example?to=addr2@an.example",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:chris@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:infobot@example.com?subject=current-issue",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:infobot@example.com?body=send%20current-issue",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:majordomo@example.com?body=subscribe%20bamboo-l",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:joe@example.com?cc=bob@example.com&body=hello",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:gorby%25kremvax@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:unlikely%3Faddress@example.com?blat=foop",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:joe@an.example?cc=bob@an.example&amp;body=hello",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:Mike%26family@example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:%22not%40me%22@example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:%22oh%5C%5Cno%22@example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:user@example.org?subject=caf%C3%A9",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "mailto:user@%E7%B4%8D%E8%B1%86.example.org?subject=Test&body=NATTO",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 6455 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ws://example.com/chat",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 6694 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "about:blank",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 6733 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#if 0 // these don't comply with RFC 3986
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "aaa://host.example.com;transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "aaa://host.example.com:6666;transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "aaa://host.example.com;protocol=diameter",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "aaa://host.example.com:6666;protocol=diameter",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "aaa://host.example.com:6666;transport=tcp;protocol=diameter",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "aaa://host.example.com:1813;transport=udp;protocol=radius",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch#endif
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 6787 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:request1@form-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:help@root-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:menu1@menu-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:request1@form-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:request2@field-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:helpgramar@root-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:request1@form-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "session:field3@form-level.store",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 6920 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ni:///sha-256;UyaQV-Ev4rdLoHyJJWCi11OHfrYv9E1aGQAlMO2X_-Q",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ni:///sha-256-32;f4OxZQ?ct=text/plain",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ni:///sha-256;f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ni://example.com/sha-256;f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nih:sha-256-120;5326-9057-e12f-e2b7-4ba0-7c89-2560-a2;f",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nih:sha-256-32;53269057;b",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "nih:3;532690-57e12f-e2b74b-a07c89-2560a2;f",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 7064 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "stun:example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "stuns:example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "stun:example.org:8000",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 7065 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "turn:example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "turns:example.org",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "turn:example.org:8000",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "turn:example.org?transport=udp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "turn:example.org?transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "turns:example.org?transport=tcp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 7230 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.example.com/hello.txt",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://example.com:80/~smith/home.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://EXAMPLE.com/%7Esmith/home.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://EXAMPLE.com:/%7esmith/home.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.example.org/where?q=now",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.example.org/pub/WWW/TheProject.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.example.org:8001",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "http://www.example.org:8080/pub/WWW/TheProject.html",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from RFC 7252 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://example.com:5683/~sensors/temp.xml",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://EXAMPLE.com/%7Esensors/temp.xml",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://EXAMPLE.com:/%7esensors/temp.xml",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://server/temperature",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://[2001:db8::2:1]/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://example.net/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://example.net/.well-known/core",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://xn--18j4d.example/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "coap://198.51.100.1:61616//%2F//?%2F%2F&?%26"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from draft-ietf-appsawg-acct-uri-06 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "acct:foobar@status.example.net",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "acct:user@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "acct:bob@example.com",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from draft-mcdonald-ipps-uri-scheme-18 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp/faxout",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp/print",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp/scan",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp/print/bob",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp/print/ira",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com/ipp/print",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "ipps://example.com:631/ipp/print",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch /* from draft-pechanec-pkcs11uri-21 */
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:object=my-pubkey;type=public",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:object=my-key;type=private?pin-source=file:/etc/token",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:token=The%20Software%20PKCS%2311%20Softtoken;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "manufacturer=Snake%20Oil,%20Inc.;model=1.0;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "object=my-certificate;type=cert;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "id=%69%95%3E%5C%F4%BD%EC%91;serial="
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "?pin-source=file:/etc/token_pin",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:object=my-sign-key;type=private?module-name=mypkcs11",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:object=my-sign-key;type=private"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "?module-path=/mnt/libmypkcs11.so.1",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:token=Software%20PKCS%2311%20softtoken;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "manufacturer=Snake%20Oil,%20Inc.?pin-value=the-pin",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:slot-description=Sun%20Metaslot",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:library-manufacturer=Snake%20Oil,%20Inc.;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "library-description=Soft%20Token%20Library;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "library-version=1.23",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:token=My%20token%25%20created%20by%20Joe;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "library-version=3;id=%01%02%03%Ba%dd%Ca%fe%04%05%06",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:token=A%20name%20with%20a%20substring%20%25%3B;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "object=my-certificate;type=cert",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:token=Name%20with%20a%20small%20A%20with%20acute:%20%C3%A1;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "object=my-certificate;type=cert",
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "pkcs11:token=my-token;object=my-certificate;"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "type=cert;vendor-aaa=value-a"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch "?pin-source=file:/etc/token_pin&vendor-bbb=value-b"
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch};
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschunsigned int rfc_uri_test_count = N_ELEMENTS(rfc_uri_tests);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschstatic void test_uri_rfc(void)
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch{
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch unsigned int i;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_begin("uri from rfcs");
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch for (i = 0; i < rfc_uri_test_count; i++) T_BEGIN {
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch const char *uri_in, *error = NULL;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch int ret;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch uri_in = rfc_uri_tests[i];
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ret = uri_check(uri_in, URI_PARSE_ALLOW_FRAGMENT_PART, &error);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_out_quiet(
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch t_strdup_printf("parse [%d] <%s>", i, str_sanitize(uri_in, 64)),
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch ret >= 0);
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch } T_END;
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_end();
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch}
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Boschvoid test_uri(void)
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch{
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_uri_valid();
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_uri_invalid();
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch test_uri_rfc();
458d877d84f62005e0ffc338f8591a8e2a36adadStephan Bosch}