GNOME Bugzilla – Bug 726982
[PATCH] It is not necessary to set the proxy from http_proxy environment variable
Last modified: 2014-06-14 13:14:08 UTC
src/librygel-renderer/rygel-av-transport.vala has the following code: var proxy = Environment.get_variable ("http_proxy"); if (proxy != null) { if (!proxy.has_prefix ("http://") && !proxy.has_prefix ("https://")) { proxy = "http://" + proxy; } this.session = new Session.with_options (Soup.SESSION_PROXY_URI, new Soup.URI (proxy)); } else { this.session = new Session (); } The above is not necessary, because libsoup now handles system proxy settings automatically (see https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html ). Also, the code ignores the no_proxy environment variable, so for example playing files from localhost was not working for me. I'll attach a patch to fix this.
Created attachment 272809 [details] [review] A patch that removes the usage of http_proxy environment variable.
there was a reason for introducing http_proxy there. SoupSession already handled that when we introduced it. I have to check with Krzesmir if he remembers the reason.
This was the original patch: https://git.gnome.org/browse/rygel/commit/?id=cee9f398ba5d45187822b6a2f6d45c22cbead614 It adds support for a default proxy resolver (with older libsoup it had to be done explicitly) AND enforces the proxy from the environment variable. The latter is not necessary, and ignores no_proxy setting. I'm not sure how the default resolver works, but it's probably using the same environment variables anyway.
I think the point was to being able to override the system proxy with http_proxy env var. I agree that ignoring the no_proxy variable is bad and that the system proxy might also set http_proxy
I think the proxy resolver that libsoup is now using is based on libproxy, and that library has support for environment variables, including no_proxy.