summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-07-13 11:55:00 -0400
committerDan Winship <danw@gnome.org>2013-07-13 11:58:04 -0400
commit2e436f5c75fcff49518a33eee6429a23f556ec6d (patch)
treee0f814abdc28940aa2b57da2c9021ea5063852e3 /tests
parent74f27b8305cfbcf9324a07bea93829237c86e687 (diff)
downloadlibsoup-2e436f5c75fcff49518a33eee6429a23f556ec6d.tar.gz
soup-uri: fix URI scheme parsing
The URI grammar allows a scheme to have digits in it after the first character, and doesn't allow [.+-] in the first character. https://bugzilla.gnome.org/show_bug.cgi?id=703776
Diffstat (limited to 'tests')
-rw-r--r--tests/uri-parsing.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/uri-parsing.c b/tests/uri-parsing.c
index 892ee2b9..d1bba4e1 100644
--- a/tests/uri-parsing.c
+++ b/tests/uri-parsing.c
@@ -128,6 +128,22 @@ static struct {
{ "http://host/keep%00nuls", "http://host/keep%00nuls",
{ "http", NULL, NULL, "host", 80, "/keep%00nuls", NULL, NULL } },
+
+ /* Bug 703776; scheme parsing */
+ { "foo0://host/path", "foo0://host/path",
+ { "foo0", NULL, NULL, "host", 0, "/path", NULL, NULL } },
+ { "f0.o://host/path", "f0.o://host/path",
+ { "f0.o", NULL, NULL, "host", 0, "/path", NULL, NULL } },
+ { "http++://host/path", "http++://host/path",
+ { "http++", NULL, NULL, "host", 0, "/path", NULL, NULL } },
+ { "http-ish://host/path", "http-ish://host/path",
+ { "http-ish", NULL, NULL, "host", 0, "/path", NULL, NULL } },
+ { "99http://host/path", NULL,
+ { NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL } },
+ { ".http://host/path", NULL,
+ { NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL } },
+ { "+http://host/path", NULL,
+ { NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL } },
};
static int num_abs_tests = G_N_ELEMENTS(abs_tests);