mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02: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:
@@ -131,7 +131,7 @@ g_test_proxy_resolver_lookup (GProxyResolver *resolver,
|
|||||||
|
|
||||||
proxies = g_new (gchar *, 3);
|
proxies = g_new (gchar *, 3);
|
||||||
|
|
||||||
if (!strncmp (uri, "simple://", 4))
|
if (g_str_has_prefix (uri, "simple://"))
|
||||||
{
|
{
|
||||||
proxies[0] = g_strdup ("direct://");
|
proxies[0] = g_strdup ("direct://");
|
||||||
proxies[1] = NULL;
|
proxies[1] = NULL;
|
||||||
|
Reference in New Issue
Block a user