diff --git a/gio/gsimpleproxyresolver.c b/gio/gsimpleproxyresolver.c index f33d49f8c..58368ea4e 100644 --- a/gio/gsimpleproxyresolver.c +++ b/gio/gsimpleproxyresolver.c @@ -327,10 +327,11 @@ g_simple_proxy_resolver_lookup (GProxyResolver *proxy_resolver, if (priv->ignore_ips || priv->ignore_domains) { gchar *host = NULL; - gushort port; + gint port; - if (_g_uri_parse_authority (uri, &host, &port, NULL, NULL) && - ignore_host (resolver, host, port)) + if (g_uri_split_network (uri, G_URI_FLAGS_PARSE_STRICT, NULL, + &host, &port, NULL) && + ignore_host (resolver, host, port > 0 ? port : 0)) proxy = "direct://"; g_free (host);