Backport patch to drop curl low speed checks; requested by flatpak
This commit is contained in:
parent
7fa01992fc
commit
0f8bad07af
@ -0,0 +1,43 @@
|
||||
From 69e00fc506e6a6d368a6e276eeb376e3d88b2fc7 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Mon, 27 Nov 2017 11:05:07 -0500
|
||||
Subject: [PATCH] fetcher/curl: Stop using CURLOPT_LOW_SPEED_TIME/_LIMIT
|
||||
|
||||
They don't play nicely currently with HTTP2 where we may
|
||||
have lots of requests queued.
|
||||
|
||||
https://github.com/ostreedev/ostree/issues/878#issuecomment-347228854
|
||||
|
||||
In practice anyways I think issues here are better solved on a higher level -
|
||||
e.g. apps today can use an overall timeout on pulls and if they exceed the limit
|
||||
set the cancellable.
|
||||
|
||||
Closes: #1349
|
||||
Approved by: alexlarsson
|
||||
---
|
||||
src/libostree/ostree-fetcher-curl.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c
|
||||
index 8a23b163..58835529 100644
|
||||
--- a/src/libostree/ostree-fetcher-curl.c
|
||||
+++ b/src/libostree/ostree-fetcher-curl.c
|
||||
@@ -788,8 +788,13 @@ initiate_next_curl_request (FetcherRequest *req,
|
||||
curl_easy_setopt (req->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
|
||||
curl_easy_setopt (req->easy, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt (req->easy, CURLOPT_CONNECTTIMEOUT, 30L);
|
||||
- curl_easy_setopt (req->easy, CURLOPT_LOW_SPEED_LIMIT, 1L);
|
||||
- curl_easy_setopt (req->easy, CURLOPT_LOW_SPEED_TIME, 30L);
|
||||
+ /* We used to set CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME
|
||||
+ * here, but see https://github.com/ostreedev/ostree/issues/878#issuecomment-347228854
|
||||
+ * basically those options don't play well with HTTP2 at the moment
|
||||
+ * where we can have lots of outstanding requests. Further,
|
||||
+ * we could implement that functionality at a higher level
|
||||
+ * more consistently too.
|
||||
+ */
|
||||
|
||||
/* closure bindings -> task */
|
||||
curl_easy_setopt (req->easy, CURLOPT_PRIVATE, task);
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,12 +1,13 @@
|
||||
Summary: Tool for managing bootable, immutable filesystem trees
|
||||
Name: ostree
|
||||
Version: 2017.13
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1451458
|
||||
Source1: 91-ostree.preset
|
||||
# Backported from upstream
|
||||
Patch0: 0001-fetcher-curl-Fix-invalid-memory-access-in-finalize.patch
|
||||
Patch1: 0001-fetcher-curl-Stop-using-CURLOPT_LOW_SPEED_TIME-_LIMI.patch
|
||||
License: LGPLv2+
|
||||
URL: https://ostree.readthedocs.io/en/latest/
|
||||
|
||||
@ -162,6 +163,9 @@ install -D -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/9
|
||||
%{_libexecdir}/libostree/ostree-trivial-httpd
|
||||
|
||||
%changelog
|
||||
* Mon Nov 27 2017 Colin Walters <walters@verbum.org> - 2017.13-4
|
||||
- Backport patch to drop curl low speed checks; requested by flatpak
|
||||
|
||||
* Tue Nov 07 2017 Kalev Lember <klember@redhat.com> - 2017.13-3
|
||||
- Backport a patch to fix a gnome-software crash when installing flatpaks
|
||||
(#1497642)
|
||||
|
Loading…
Reference in New Issue
Block a user