mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 08:58:54 +02:00
guri: Improve performance of remove_dot_segments() algorithm
This commit is contained in:
committed by
Philip Withnall
parent
927c7e4e58
commit
21b45d6ac2
@@ -898,6 +898,19 @@ static const UriRelativeTest relative_tests[] = {
|
||||
{ "ScHeMe://User:P%61ss@HOST.%63om:1234/path/./from/../to%7d/item%2dobj?qu%65ry=something#fr%61gment",
|
||||
"scheme://User:Pass@HOST.com:1234/path/to%7D/item-obj?query=something#fragment",
|
||||
{ "scheme", "User:Pass", "HOST.com", 1234, "/path/to}/item-obj", "query=something", "fragment" } },
|
||||
/* Test corner cases of remove_dot_segments */
|
||||
{ "http:..", "http:",
|
||||
{ "http", NULL, NULL, -1, "", NULL, NULL } },
|
||||
{ "http:../", "http:",
|
||||
{ "http", NULL, NULL, -1, "", NULL, NULL } },
|
||||
{ "http:.", "http:",
|
||||
{ "http", NULL, NULL, -1, "", NULL, NULL } },
|
||||
{ "http:./", "http:",
|
||||
{ "http", NULL, NULL, -1, "", NULL, NULL } },
|
||||
{ "http:a/..", "http:/",
|
||||
{ "http", NULL, NULL, -1, "/", NULL, NULL } },
|
||||
{ "http:a/../", "http:/",
|
||||
{ "http", NULL, NULL, -1, "/", NULL, NULL } },
|
||||
};
|
||||
static int num_relative_tests = G_N_ELEMENTS (relative_tests);
|
||||
|
||||
|
Reference in New Issue
Block a user