From 807f2baa53d26eb73ddc0d29d7fb36d623911492 Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Tue, 5 Mar 2019 13:28:00 -0800 Subject: Move interpretation of OSTREE_DEBUG_HTTP It makes more sense to have this in flatpak_create_soup_session() so every caller of that interprets the env var. Closes: #2740 Approved by: matthiasclasen --- common/flatpak-dir.c | 3 --- common/flatpak-utils-http.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 2c6bf0bc..17f670c5 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -4059,9 +4059,6 @@ ensure_soup_session (FlatpakDir *self) soup_session = flatpak_create_soup_session (PACKAGE_STRING); - if (g_getenv ("OSTREE_DEBUG_HTTP")) - soup_session_add_feature (soup_session, (SoupSessionFeature *) soup_logger_new (SOUP_LOGGER_LOG_BODY, 500)); - g_once_init_leave (&self->soup_session, soup_session); } } diff --git a/common/flatpak-utils-http.c b/common/flatpak-utils-http.c index 6a77f6a6..8155a88f 100644 --- a/common/flatpak-utils-http.c +++ b/common/flatpak-utils-http.c @@ -504,6 +504,9 @@ flatpak_create_soup_session (const char *user_agent) g_object_set (soup_session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); } + if (g_getenv ("OSTREE_DEBUG_HTTP")) + soup_session_add_feature (soup_session, (SoupSessionFeature *) soup_logger_new (SOUP_LOGGER_LOG_BODY, 500)); + return soup_session; } -- cgit v1.2.1