comparison src/proxy.c @ 10534:975c2e66cd53

[gaim-migrate @ 11866] If you have your proxy set to 'Use Environmental Settings', but don't actually have any relevant environment variables set, you probably want to connect directly (as mentioned in bug 1105809). This does just that. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 20 Jan 2005 20:58:25 +0000
parents 61852117568f
children 1db4f49de0c6
comparison
equal deleted inserted replaced
10533:ace8cd0de6ea 10534:975c2e66cd53
1561 phb->account = account; 1561 phb->account = account;
1562 1562
1563 if (gaim_proxy_info_get_type(phb->gpi) == GAIM_PROXY_USE_ENVVAR) { 1563 if (gaim_proxy_info_get_type(phb->gpi) == GAIM_PROXY_USE_ENVVAR) {
1564 if ((tmp = g_getenv("HTTP_PROXY")) != NULL || 1564 if ((tmp = g_getenv("HTTP_PROXY")) != NULL ||
1565 (tmp = g_getenv("http_proxy")) != NULL || 1565 (tmp = g_getenv("http_proxy")) != NULL ||
1566 (tmp= g_getenv("HTTPPROXY")) != NULL) { 1566 (tmp = g_getenv("HTTPPROXY")) != NULL) {
1567 char *proxyhost,*proxypath,*proxyuser,*proxypasswd; 1567 char *proxyhost,*proxypath,*proxyuser,*proxypasswd;
1568 int proxyport; 1568 int proxyport;
1569 1569
1570 /* http_proxy-format: 1570 /* http_proxy-format:
1571 * export http_proxy="http://user:passwd@your.proxy.server:port/" 1571 * export http_proxy="http://user:passwd@your.proxy.server:port/"
1590 (tmp = g_getenv("HTTPPROXYPORT")) != NULL)) 1590 (tmp = g_getenv("HTTPPROXYPORT")) != NULL))
1591 proxyport = atoi(tmp); 1591 proxyport = atoi(tmp);
1592 1592
1593 gaim_proxy_info_set_port(phb->gpi, proxyport); 1593 gaim_proxy_info_set_port(phb->gpi, proxyport);
1594 } 1594 }
1595 } else {
1596 /* no proxy environment variable found, don't use a proxy */
1597 gaim_debug_info("proxy", "No environment settings found, not using a proxy\n");
1598 gaim_proxy_info_set_type(phb->gpi, GAIM_PROXY_NONE);
1595 } 1599 }
1596 1600
1597 /* XXX: Do we want to skip this step if user/password were part of url? */ 1601 /* XXX: Do we want to skip this step if user/password were part of url? */
1598 if ((tmp = g_getenv("HTTP_PROXY_USER")) != NULL || 1602 if ((tmp = g_getenv("HTTP_PROXY_USER")) != NULL ||
1599 (tmp = g_getenv("http_proxy_user")) != NULL || 1603 (tmp = g_getenv("http_proxy_user")) != NULL ||