summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2022-06-13 14:13:15 +0200
committerAlexander Larsson <alexander.larsson@gmail.com>2022-06-16 13:49:45 +0200
commitb1083a4c4151c01e8d76e40939576d343fa37a71 (patch)
tree4929096f05df7de36f04d49c4f6db0c8d3527976 /app
parentd4508905a5aba2c7d09069c9851af02ae90c2f20 (diff)
downloadflatpak-b1083a4c4151c01e8d76e40939576d343fa37a71.tar.gz
http utils: Make a generic FlatpakHttpSession instead of SoupSession
Its still just a SoupSession, but now the implementation is more centralized and can be something else down the line.
Diffstat (limited to 'app')
-rw-r--r--app/flatpak-builtins-install.c6
-rw-r--r--app/flatpak-builtins-remote-add.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/app/flatpak-builtins-install.c b/app/flatpak-builtins-install.c
index 970bf3ea..afa2bb72 100644
--- a/app/flatpak-builtins-install.c
+++ b/app/flatpak-builtins-install.c
@@ -221,9 +221,9 @@ install_from (FlatpakDir *dir,
if (g_str_has_prefix (filename, "http:") ||
g_str_has_prefix (filename, "https:"))
{
- g_autoptr(SoupSession) soup_session = NULL;
- soup_session = flatpak_create_soup_session (PACKAGE_STRING);
- file_data = flatpak_load_uri (soup_session, filename, 0, NULL, NULL, NULL, NULL, cancellable, error);
+ g_autoptr(FlatpakHttpSession) http_session = NULL;
+ http_session = flatpak_create_http_session (PACKAGE_STRING);
+ file_data = flatpak_load_uri (http_session, filename, 0, NULL, NULL, NULL, NULL, cancellable, error);
if (file_data == NULL)
{
g_prefix_error (error, "Can't load uri %s: ", filename);
diff --git a/app/flatpak-builtins-remote-add.c b/app/flatpak-builtins-remote-add.c
index e273ca9d..1cf6a909 100644
--- a/app/flatpak-builtins-remote-add.c
+++ b/app/flatpak-builtins-remote-add.c
@@ -244,10 +244,10 @@ load_options (const char *remote_name,
{
const char *options_data;
gsize options_size;
- g_autoptr(SoupSession) soup_session = NULL;
+ g_autoptr(FlatpakHttpSession) http_session = NULL;
- soup_session = flatpak_create_soup_session (PACKAGE_STRING);
- bytes = flatpak_load_uri (soup_session, filename, 0, NULL, NULL, NULL, NULL, NULL, &local_error);
+ http_session = flatpak_create_http_session (PACKAGE_STRING);
+ bytes = flatpak_load_uri (http_session, filename, 0, NULL, NULL, NULL, NULL, NULL, &local_error);
if (bytes == NULL)
{