mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
gio: use g_uri_split_network() in g_simple_proxy_resolver_lookup()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
1b6a0535e8
commit
aa0b09ebef
@ -327,10 +327,11 @@ g_simple_proxy_resolver_lookup (GProxyResolver *proxy_resolver,
|
|||||||
if (priv->ignore_ips || priv->ignore_domains)
|
if (priv->ignore_ips || priv->ignore_domains)
|
||||||
{
|
{
|
||||||
gchar *host = NULL;
|
gchar *host = NULL;
|
||||||
gushort port;
|
gint port;
|
||||||
|
|
||||||
if (_g_uri_parse_authority (uri, &host, &port, NULL, NULL) &&
|
if (g_uri_split_network (uri, G_URI_FLAGS_PARSE_STRICT, NULL,
|
||||||
ignore_host (resolver, host, port))
|
&host, &port, NULL) &&
|
||||||
|
ignore_host (resolver, host, port > 0 ? port : 0))
|
||||||
proxy = "direct://";
|
proxy = "direct://";
|
||||||
|
|
||||||
g_free (host);
|
g_free (host);
|
||||||
|
Loading…
Reference in New Issue
Block a user