From 08c4340d59408e72604d72d961714ca8c5230640 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 1 Jan 2011 22:38:07 -0800 Subject: gweb: Skip hostname resolving when proxy is used --- gweb/gweb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gweb') diff --git a/gweb/gweb.c b/gweb/gweb.c index 229989ef..5de10836 100644 --- a/gweb/gweb.c +++ b/gweb/gweb.c @@ -1100,7 +1100,7 @@ static guint do_request(GWeb *web, const char *url, session->header_done = FALSE; session->body_done = FALSE; - if (inet_aton(session->host, NULL) == 0) { + if (session->address == NULL && inet_aton(session->host, NULL) == 0) { session->resolv_action = g_resolv_lookup_hostname(web->resolv, session->host, resolv_result, session); if (session->resolv_action == 0) { @@ -1108,7 +1108,8 @@ static guint do_request(GWeb *web, const char *url, return 0; } } else { - session->address = g_strdup(session->host); + if (session->address == NULL) + session->address = g_strdup(session->host); if (create_transport(session) < 0) { free_session(session); -- cgit v1.2.3