[glib: 10/13] gio: use g_uri_split_network() in g_simple_proxy_resolver_lookup()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 10/13] gio: use g_uri_split_network() in g_simple_proxy_resolver_lookup()
- Date: Wed, 5 Aug 2020 16:06:03 +0000 (UTC)
commit aa0b09ebeff911c9c9d2ca6c3efd06ff45a339f3
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Tue Jul 7 13:03:44 2020 +0400
gio: use g_uri_split_network() in g_simple_proxy_resolver_lookup()
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
gio/gsimpleproxyresolver.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]