If the proxy is specified then we should set the session->host to the
parsed proxy hostname. The proxy hostname was instead being set in the
session->address variable.

Since session->address is not being resolved, specifying the http_proxy
variable in the scheme http_proxy=proxy.example.com:3128 would not work.
From a6446d8d9c3dd00864204a2352e66415743e6329 Mon Sep 17 00:00:00 2001
From: Sameer Naik <sam...@damagehead.com>
Date: Mon, 13 Feb 2012 17:40:31 +0530
Subject: [PATCH 2/2] gweb: set session->host to the parsed proxy hostname.

If the proxy is specified then we should set the session->host to the
parsed proxy hostname. The proxy hostname was instead being set in the
session->address variable.

Since session->address is not being resolved, specifying the http_proxy
variable in the scheme http_proxy=proxy.example.com:3128 would not work.
---
 gweb/gweb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gweb/gweb.c b/gweb/gweb.c
index 6d9e7ad..da2ab0a 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1125,7 +1125,9 @@ static int parse_url(struct web_session *session,
 		}
 	}
 
-	session->address = g_strdup(host);
+	if (session->host)
+		g_free(session->host);
+	session->host = g_strdup(host);
 
 	g_free(scheme);
 
-- 
1.7.6.5

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to