if (synchronous) {
session = soup_session_sync_new_with_options (
SOUP_SESSION_SSL_CA_FILE, cafile,
- SOUP_SESSION_PROXY_URI, proxy,
#ifdef HAVE_GNOME
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26,
#endif
} else {
session = soup_session_async_new_with_options (
SOUP_SESSION_SSL_CA_FILE, cafile,
- SOUP_SESSION_PROXY_URI, proxy,
#ifdef HAVE_GNOME
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26,
#endif
NULL);
}
+ /* Need to do this after creating the session, since adding
+ * SOUP_TYPE_GNOME_FEATURE_2_26 will add a proxy resolver, thereby
+ * bashing over the manually-set proxy.
+ */
+ if (proxy) {
+ g_object_set (G_OBJECT (session),
+ SOUP_SESSION_PROXY_URI, proxy,
+ NULL);
+ }
+
if (recurse) {
char *outdir;