summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-11-13 17:04:39 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-08-27 17:34:32 +0200
commit92e663be86868f0bed69b402812c1ee107c039ee (patch)
tree7e100a28c4eb7cc2d12d9d5b4a51bad0d85ee7bc
parent7d14e6ee60ad9348908293c98252aed99b1474e2 (diff)
Attach SoupLogger after SoupCookieJar
The SoupLogger instance needs to be attached last (at least after the SoupCookieJar librest uses), otherwise REST_DEBUG=proxy will not dump the cookie headers added by the SoupCookieJar instance. https://bugzilla.gnome.org/show_bug.cgi?id=712231 (cherry picked from commit 024aecd486b8cd6b520565f15dc8d5f125d09509)
-rw-r--r--rest/rest-proxy.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/rest/rest-proxy.c b/rest/rest-proxy.c
index d3ebaba..ba0d515 100644
--- a/rest/rest-proxy.c
+++ b/rest/rest-proxy.c
@@ -253,6 +253,16 @@ rest_proxy_constructed (GObject *object)
g_object_unref (cookie_jar);
}
+ if (REST_DEBUG_ENABLED(PROXY)) {
+ SoupSessionFeature *logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_BODY, 0);
+ soup_session_add_feature (priv->session, logger);
+ g_object_unref (logger);
+
+ logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_BODY, 0);
+ soup_session_add_feature (priv->session_sync, logger);
+ g_object_unref (logger);
+ }
+
/* session lifetime is same as self, no need to keep signalid */
g_signal_connect_swapped (priv->session, "authenticate",
G_CALLBACK(authenticate), object);
@@ -432,16 +442,6 @@ rest_proxy_init (RestProxy *self)
soup_session_add_feature_by_type (priv->session_sync,
SOUP_TYPE_PROXY_RESOLVER_GNOME);
#endif
-
- if (REST_DEBUG_ENABLED(PROXY)) {
- SoupSessionFeature *logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_BODY, 0);
- soup_session_add_feature (priv->session, logger);
- g_object_unref (logger);
-
- logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_BODY, 0);
- soup_session_add_feature (priv->session_sync, logger);
- g_object_unref (logger);
- }
}
/**