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;
static const ViewOption WITH_SCHEME
Option to include scheme name in the URL string.
static const ViewOption WITH_HOST
Option to include hostname in the URL string.
static const ViewOption WITH_PATH_NAME
Option to include path name in the URL string.
Url::asString() view options.
Remember a files attributes to detect content changes.
std::string asString() const
Returns a default string representation of the Url object.
static const ViewOption WITH_PORT
Option to include port number in the URL string.