Skip to content

Commit

Permalink
Backport comrpessed downloads change
Browse files Browse the repository at this point in the history
  • Loading branch information
nanonyme committed Feb 8, 2024
1 parent f5677dc commit b6796e4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion org.flatpak.Builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@
"type": "patch",
"paths": [
"patches/flatpak-builder-Execute-appstream-util-on-the-host.patch",
"patches/flatpak-builder-lfs.patch"
"patches/flatpak-builder-lfs.patch",
"patches/0001-Enable-compressed-downloads.patch"
]
}
]
Expand Down
21 changes: 21 additions & 0 deletions patches/0001-Enable-compressed-downloads.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 2e15fc955254c6da087c6d1644b1f239275eba99 Mon Sep 17 00:00:00 2001
From: Ranieri Althoff <[email protected]>
Date: Sun, 23 Jul 2023 15:11:40 +0200
Subject: [PATCH] Enable compressed downloads


diff --git a/src/builder-utils.c b/src/builder-utils.c
index 556f16ba..bd43c88b 100644
--- a/src/builder-utils.c
+++ b/src/builder-utils.c
@@ -1106,6 +1106,7 @@ builder_download_uri_buffer (GUri *uri,
g_autofree gchar *url = g_uri_to_string (uri);

curl_easy_setopt (session, CURLOPT_URL, url);
+ curl_easy_setopt (session, CURLOPT_ACCEPT_ENCODING, "");
curl_easy_setopt (session, CURLOPT_REFERER, http_referer);
curl_easy_setopt (session, CURLOPT_WRITEFUNCTION, builder_curl_write_cb);
curl_easy_setopt (session, CURLOPT_WRITEDATA, &write_data);
--
2.43.0.windows.1

0 comments on commit b6796e4

Please sign in to comment.