Merge branch 'carlosgc/remove-dot-segments' into 'master'

guri: always apply the remove dot segments algorithm

Closes #2342

See merge request GNOME/glib!2084
This commit is contained in:
Philip Withnall 2021-05-13 13:13:34 +00:00
commit 82e2517257
2 changed files with 5 additions and 1 deletions

View File

@ -1508,6 +1508,10 @@ g_uri_parse_relative (GUri *base_uri,
uri->port = normalize_port (uri->scheme, uri->port); uri->port = normalize_port (uri->scheme, uri->port);
} }
} }
else
{
remove_dot_segments (uri->path);
}
return g_steal_pointer (&uri); return g_steal_pointer (&uri);
} }

View File

@ -714,7 +714,7 @@ static const UriAbsoluteTest absolute_tests[] = {
/* ".." past top */ /* ".." past top */
{ "http://example.com/..", G_URI_FLAGS_NONE, TRUE, 0, { "http://example.com/..", G_URI_FLAGS_NONE, TRUE, 0,
{ "http", NULL, "example.com", -1, "/..", NULL, NULL } { "http", NULL, "example.com", -1, "/", NULL, NULL }
}, },
/* scheme parsing */ /* scheme parsing */