24 using namespace zypp::base;
35 const char * val = getenv( _var.c_str() );
40 ::unsetenv( _var.c_str() );
48 setenv( _var.c_str(), _val.c_str(), 1 );
59 static pxProxyFactory * proxyFactory = 0;
63 static WatchFile sysconfigProxy(
"/etc/sysconfig/proxy", WatchFile::NO_INIT );
66 MIL <<
"Build Libproxy Factory from /etc/sysconfig/proxy" << endl;
68 ::px_proxy_factory_free( proxyFactory );
70 TmpUnsetEnv envguard[] __attribute__ ((__unused__)) = {
"KDE_FULL_SESSION",
"GNOME_DESKTOP_SESSION_ID",
"DESKTOP_SESSION" };
71 proxyFactory = ::px_proxy_factory_new();
73 else if ( ! proxyFactory )
75 MIL <<
"Build Libproxy Factory" << endl;
76 proxyFactory = ::px_proxy_factory_new();
82 ProxyInfoLibproxy::ProxyInfoLibproxy()
103 char **proxies = px_proxy_factory_get_proxies(
_factory,
104 (
char *)url_r.
asString(vopt).c_str());
112 for (
int i = 0; proxies[i]; i++) {
114 !strncmp(proxies[i],
"http://", 7))
124 std::string sresult = result;