mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
proxy-test: fix check for simple:// URI scheme
This has no practical impact, since it's only a test, and none of the test code would have hit this bug, but the GTestProxyResolver's check to see if the URI scheme is simple:// currently only compares the first four bytes of the string, so it's actually only checking for the "simp" and would match anything else after that, e.g. "simpleton://". This is surely not intended.
This commit is contained in:
parent
6d381c9668
commit
4667f5980a
@ -131,7 +131,7 @@ g_test_proxy_resolver_lookup (GProxyResolver *resolver,
|
||||
|
||||
proxies = g_new (gchar *, 3);
|
||||
|
||||
if (!strncmp (uri, "simple://", 4))
|
||||
if (g_str_has_prefix (uri, "simple://"))
|
||||
{
|
||||
proxies[0] = g_strdup ("direct://");
|
||||
proxies[1] = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user