GNOME Bugzilla – Bug 405119
don't export http_proxy when there is no host defined
Last modified: 2008-05-29 20:40:28 UTC
That bug has been described on https://launchpad.net/bugs/78098 "If I set a socks proxy without setting an http proxy, gnome terminal sessions still have the http_proxy environment variable set, but as "http://:8080". Needless to say, this does not work. ... > Alex, do you have "8080" as port number for http to the dialog? I tried again and without an IP nor a port there is no http_proxy variable set on my feisty desktop ... Yes, I did. 8080 was the default value; I assumed it would be ignored if the host was left blank. Further, using gconf-editor's "unset key" action on /system/http_proxy/port sets it back to 8080 Through the applet I cannot completely unset the port. It gets set to 0 if I blank it out (and the gconf key /system/http_proxy/use_http_proxy stays set) So presumably either this applet should be changed to default to 0; or other things (gnome-session?) should ignore the [other] settings for http_proxy if the host is blank; or the the applet should unset the key /system/http_proxy/use_http_proxy if the host is blank, and whatever sets the environment variable should read the key /system/http_proxy/use_http_proxy instead of using /system/http_proxy/host and /system/http_proxy/port."
Just so that I don't lose this: cf. bug 343811.
The terminal sets the http_env when creating a new terminal iff: - when g-t itself was launched, the http_variable was not set; and - the /system/http_proxy/use_http_proxy is set to true. If the proxy gconf keys are in a sane state, that should be enough, no? CCint g-c-c-maint...
(In reply to comment #2) > If the proxy gconf keys are in a sane state, that should be enough, no? > CCint g-c-c-maint... > Is /system/http_proxy/host="" and /system/http_proxy/port="8080" and /system/http_proxy/use_http_proxy=true considered "a sane state"? I would think not, as clearly using an empty host will never work -- at least without some bizarre firewalling rules, and even then I'm not sure it's possible.
What I meant is, if everything that manipulates the gconf keys leaves them in a sane state. If at some point /system/http_proxy/host="" and /system/http_proxy/port="8080" and /system/http_proxy/use_http_proxy=true, then clearly something has in the past changed the gconf keys to be in a non-sane state.
Getting that state is quite easy, you might want to use a socks proxy only, an easy way for the user to not use an HTTP one is to clear the entry which leads him to that config. The "use_http_proxy" might be misnamed, it's set when configuring a sock proxy and no http one for example
Can someone who knows how is one is supposed to interpret the gconf strings write a spec on live.gnome.org? The most common use is to get the http proxy: a pseudocode example which obtains it would be the perfect finishing touch to that spec...
*** This bug has been marked as a duplicate of 343811 ***