diff options
-rw-r--r-- | calendar/gui/itip-utils.c | 14 | ||||
-rw-r--r-- | mail/e-http-request.c | 14 | ||||
-rw-r--r-- | mail/e-mail-autoconfig.c | 15 | ||||
-rw-r--r-- | modules/gravatar/e-gravatar-photo-source.c | 15 |
4 files changed, 58 insertions, 0 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index beb62b9189..440ae8ff46 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -2171,6 +2171,7 @@ itip_publish_comp (ECalClient *cal_client, SoupMessage *msg; SoupURI *real_uri; gchar *ical_string = NULL; + EProxy *proxy; toplevel = e_cal_util_new_top_level (); icalcomponent_set_method (toplevel, ICAL_METHOD_PUBLISH); @@ -2187,6 +2188,19 @@ itip_publish_comp (ECalClient *cal_client, session = soup_session_async_new (); g_object_set (session, SOUP_SESSION_TIMEOUT, 90, NULL); + proxy = e_proxy_new (); + e_proxy_setup_proxy (proxy); + + if (e_proxy_require_proxy_for_uri (proxy, uri)) { + SoupURI *proxy_uri; + + proxy_uri = e_proxy_peek_uri_for (proxy, uri); + + g_object_set (session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); + } + + g_clear_object (&proxy); + real_uri = soup_uri_new (uri); if (!real_uri || !real_uri->host) { g_warning (G_STRLOC ": Invalid URL: %s", uri); diff --git a/mail/e-http-request.c b/mail/e-http-request.c index 14bfdda181..fb516f98ba 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -334,6 +334,7 @@ handle_http_request (GSimpleAsyncResult *res, CamelStream *cache_stream; GError *error; GMainContext *context; + EProxy *proxy; context = g_main_context_new (); g_main_context_push_thread_default (context); @@ -342,6 +343,19 @@ handle_http_request (GSimpleAsyncResult *res, SOUP_SESSION_TIMEOUT, 90, NULL); + proxy = e_proxy_new (); + e_proxy_setup_proxy (proxy); + + if (e_proxy_require_proxy_for_uri (proxy, uri)) { + SoupURI *proxy_uri; + + proxy_uri = e_proxy_peek_uri_for (proxy, uri); + + g_object_set (session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); + } + + g_clear_object (&proxy); + message = soup_message_new (SOUP_METHOD_GET, uri); soup_message_headers_append ( message->request_headers, "User-Agent", "Evolution/" VERSION); diff --git a/mail/e-mail-autoconfig.c b/mail/e-mail-autoconfig.c index 61fe0c6f75..ca0b96405f 100644 --- a/mail/e-mail-autoconfig.c +++ b/mail/e-mail-autoconfig.c @@ -377,10 +377,25 @@ mail_autoconfig_lookup (EMailAutoconfig *autoconfig, gboolean success; guint status; gchar *uri; + EProxy *proxy; soup_session = soup_session_sync_new (); uri = g_strconcat (AUTOCONFIG_BASE_URI, domain, NULL); + + proxy = e_proxy_new (); + e_proxy_setup_proxy (proxy); + + if (e_proxy_require_proxy_for_uri (proxy, uri)) { + SoupURI *proxy_uri; + + proxy_uri = e_proxy_peek_uri_for (proxy, uri); + + g_object_set (soup_session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); + } + + g_clear_object (&proxy); + soup_message = soup_message_new (SOUP_METHOD_GET, uri); g_free (uri); diff --git a/modules/gravatar/e-gravatar-photo-source.c b/modules/gravatar/e-gravatar-photo-source.c index 655046cd14..b41c689712 100644 --- a/modules/gravatar/e-gravatar-photo-source.c +++ b/modules/gravatar/e-gravatar-photo-source.c @@ -21,6 +21,7 @@ #include <libsoup/soup.h> #include <libsoup/soup-requester.h> #include <libsoup/soup-request-http.h> +#include <libedataserver/libedataserver.h> #define E_GRAVATAR_PHOTO_SOURCE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -69,6 +70,7 @@ gravatar_photo_source_get_photo_thread (GSimpleAsyncResult *simple, GInputStream *stream = NULL; gchar *hash; gchar *uri; + EProxy *proxy; GError *local_error = NULL; async_context = g_simple_async_result_get_op_res_gpointer (simple); @@ -81,6 +83,19 @@ gravatar_photo_source_get_photo_thread (GSimpleAsyncResult *simple, session = soup_session_sync_new (); + proxy = e_proxy_new (); + e_proxy_setup_proxy (proxy); + + if (e_proxy_require_proxy_for_uri (proxy, uri)) { + SoupURI *proxy_uri; + + proxy_uri = e_proxy_peek_uri_for (proxy, uri); + + g_object_set (session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); + } + + g_clear_object (&proxy); + requester = soup_requester_new (); soup_session_add_feature (session, SOUP_SESSION_FEATURE (requester)); |