summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Fernyhough2021-03-05 01:43:51 +0000
committerJonathon Fernyhough2021-03-05 01:43:51 +0000
commit92c24590a86d17347eae91fd09bea9b92a3e7eca (patch)
tree18be2d1bc2fa3dc929a18fec15c67dda1172faae
parent326254d241e52296551fabff77e4366d5485fe19 (diff)
downloadaur-92c24590a86d17347eae91fd09bea9b92a3e7eca.tar.gz
Fix support for HTTP/2
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--http2.patch13
3 files changed, 23 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ea434ea31842..42a2395a420d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = zsync2-git
pkgdesc = A file transfer program that's able to connect to rsync servers
pkgver = 2.0.0pre
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/AppImage/zsync2
arch = x86_64
license = custom:Artistic
@@ -15,10 +15,12 @@ pkgbase = zsync2-git
source = git+https://github.com/Taywee/args.git
source = git+https://github.com/AppImage/cpr.git
source = git+https://github.com/google/googletest.git
+ source = http2.patch
b2sums = SKIP
b2sums = SKIP
b2sums = SKIP
b2sums = SKIP
+ b2sums = 2306c159a0575442902efdf7304a989709baf2206cf87bfd9865595679f2d42e135c40513f651c6e15e9f30a87f1983ab6b2bf172b5090dc62af0f03ab198cb3
pkgname = zsync2-git
diff --git a/PKGBUILD b/PKGBUILD
index f30fa89ef972..fe4487a81326 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,11 +12,13 @@ makedepends=(cmake git gnutls openssl zlib)
source=(git+$url.git
git+https://github.com/Taywee/args.git
git+https://github.com/AppImage/cpr.git
- git+https://github.com/google/googletest.git)
+ git+https://github.com/google/googletest.git
+ http2.patch)
b2sums=('SKIP'
'SKIP'
'SKIP'
- 'SKIP')
+ 'SKIP'
+ '2306c159a0575442902efdf7304a989709baf2206cf87bfd9865595679f2d42e135c40513f651c6e15e9f30a87f1983ab6b2bf172b5090dc62af0f03ab198cb3')
pkgver() {
cd ${pkgname/-git/}
@@ -33,6 +35,9 @@ prepare() {
git config submodule.lib/cpr.url "$srcdir"/cpr
git config submodule.lib/gtest.url "$srcdir"/googletest
git submodule update
+
+ # https://github.com/AppImage/zsync2/pull/57
+ git apply "$srcdir"/http2.patch
}
build() {
diff --git a/http2.patch b/http2.patch
new file mode 100644
index 000000000000..f40f3ead6c5e
--- /dev/null
+++ b/http2.patch
@@ -0,0 +1,13 @@
+diff --git a/src/legacy_http.c b/src/legacy_http.c
+index f97c5a2..03e2919 100644
+--- a/src/legacy_http.c
++++ b/src/legacy_http.c
+@@ -521,7 +521,7 @@ int range_fetch_read_http_headers(struct range_fetch *rf) {
+ }
+ if (buf[0] == 0)
+ return 0; /* EOF, caller decides if that's an error */
+- if (memcmp(buf, "HTTP/1", 6) != 0 || (p = strchr(buf, ' ')) == NULL) {
++ if (memcmp(buf, "HTTP/", 5) != 0 || (p = strchr(buf, ' ')) == NULL) {
+ log_message("got non-HTTP response '%s'\n", buf);
+ return -1;
+ }