mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-15 18:31:07 +02:00
guri: always apply the remove dot segments algorithm
And not only when g_uri_parse_relative() is called with a base uri. This follows the spec and it's compatible with SoupURI. Fixes #2342
This commit is contained in:
parent
2cb303b7aa
commit
7e428aa4e5
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user