aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-07-16 00:41:46 +0800
committerMilan Crha <mcrha@redhat.com>2013-07-16 00:41:46 +0800
commita8912305321a2ca2b902598566ef0a8ced490cd6 (patch)
tree00ddf754217cbf4339616187cf47793afd1df7bc
parent9cc5efee026dcb216b64cc32ee36a534f7e4d097 (diff)
downloadgsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.tar
gsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.tar.gz
gsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.tar.bz2
gsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.tar.lz
gsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.tar.xz
gsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.tar.zst
gsoc2013-evolution-a8912305321a2ca2b902598566ef0a8ced490cd6.zip
Bug #703389 - Proxy ignored for images
-rw-r--r--calendar/gui/itip-utils.c14
-rw-r--r--mail/e-http-request.c14
-rw-r--r--mail/e-mail-autoconfig.c15
3 files changed, 43 insertions, 0 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index e07c3fb352..c7e8fca836 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -2168,6 +2168,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);
@@ -2184,6 +2185,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 0d6ccc26a1..e77a4e5a0c 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -333,6 +333,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);
@@ -341,6 +342,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);