GNOME Bugzilla – Bug 432745
Flickr export does not use gnome network proxy
Last modified: 2008-11-28 13:21:57 UTC
Please describe the problem: f-spot does not seem to be picking up the network proxy configuration set using gnome-network-preferences. However, setting http_proxy environment variable and starting f-spot from a terminal works. In detail: I am using f-spot's flickr export behind a network proxy on an Ubuntu 7.04 Feisty installation with GNOME 2.18.1. The proxy url, port, username and password are correctly configured using gnome-network-preferences. When I click on "Authorize", while trying to export a photo to Flickr using File -> Export -> Flickr, f-spot stops responding for a while and comes back with a info box saying "Unable to log on. The request timed out (9999)". Flickr export works normally (Authorizes, uploads) if I set the http_proxy environment variable and start f-spot from a terminal window. Steps to reproduce: 0. Behind an HTTP proxy (no direct access to the Internet) 1. Configure proxy settings in gnome-network-preferences. 2. Start f-spot from the menu. 3. Select a photo, go to File->Export->Export to Flickr... 4. Click on "Authorize". Actual results: f-spot stops responding for a while and comes back with a info box saying "Unable to log on. The request timed out (9999)". Expected results: The default web browser should open flickr page asking for permission to allow f-spot to access my flickr account. Does this happen every time? Yes. Happens everytime. However, f-spot export functions work normally if http_proxy environment variable is set first, and f-spot is started from the terminal Other information: Similar problems (f-spot stops responding for some time) occur with other export functions (picasaweb, smugmug, etc) however I have not been able to provide reports for these since I don't have accounts on these services.
The same problem is with PicasaWeb and probably all other over-the-web exports.
Created attachment 123483 [details] [review] initialize Gnome system proxy globally on start, making all extensions implicitly aware of it Fixes all export extensions that use WebRequest for HTTP communication. The fix reuses the exising but unused Preferences.GetWebProxy() method. BTW, running from the command-line enables proxy because Mono does automatically initialize DefaultWebProxy from the http_proxy environment variable (skipping credentials), and gnome-terminal sets this environment variable automatically in case Gnome system proxy is set. This patch initializes DefaultWebProxy directly from GConf settings, together with credentials, if they are defined.
Created attachment 123579 [details] [review] Patch updated after the discussion with Stephane on #f-spot. Proxy setting code moved out of Preferences.cs to a separate class WebProxy.cs, which initialization is now triggered from main.cs.
fixed in r4644