aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSodface <sod@sodface.com>2021-10-02 09:09:22 -0400
committerLeo <thinkabit.ukim@gmail.com>2021-10-03 04:22:45 +0000
commit705373c99f85be9fca9cfdb9527f6307cc5d5196 (patch)
tree1993c35b7d624ed25aecf815c143eef47643c6a9
parent387f15ef4ad58136f82973ff1634e57549685988 (diff)
downloadaports-705373c99f85be9fca9cfdb9527f6307cc5d5196.tar.gz
aports-705373c99f85be9fca9cfdb9527f6307cc5d5196.tar.bz2
aports-705373c99f85be9fca9cfdb9527f6307cc5d5196.tar.xz
community/althttpd: use GMT in header dates
-rw-r--r--community/althttpd/20-force-GMT-headers.patch14
-rw-r--r--community/althttpd/APKBUILD4
2 files changed, 17 insertions, 1 deletions
diff --git a/community/althttpd/20-force-GMT-headers.patch b/community/althttpd/20-force-GMT-headers.patch
new file mode 100644
index 0000000000..44e9783ee9
--- /dev/null
+++ b/community/althttpd/20-force-GMT-headers.patch
@@ -0,0 +1,14 @@
+The strftime %Z format specifier returns UTC on musl in this
+context, force use of GMT to prevent client errors.
+See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12979
+--- src/althttpd.c.orig
++++ src/althttpd.c
+@@ -617,7 +617,7 @@
+ struct tm *tm;
+ static char zDate[100];
+ tm = gmtime(&t);
+- strftime(zDate, sizeof(zDate), "%a, %d %b %Y %H:%M:%S %Z", tm);
++ strftime(zDate, sizeof(zDate), "%a, %d %b %Y %H:%M:%S GMT", tm);
+ return zDate;
+ }
+
diff --git a/community/althttpd/APKBUILD b/community/althttpd/APKBUILD
index 9e1f7a3a0a..7cd1d2f1b2 100644
--- a/community/althttpd/APKBUILD
+++ b/community/althttpd/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Sodface <sod@sodface.com>
pkgname=althttpd
pkgver=202108141729
-pkgrel=0
+pkgrel=1
pkgdesc="Small, simple, stand-alone HTTP server"
url="https://sqlite.org/althttpd/doc/trunk/althttpd.md"
arch="all"
@@ -11,6 +11,7 @@ options="!check" # no test suite
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.zip::https://sqlite.org/althttpd/zip?in=althttpd.c&r=$pkgver
10-allow-filename-plus-sign.patch
+ 20-force-GMT-headers.patch
$pkgname.confd
$pkgname.initd"
builddir="$srcdir/"
@@ -30,6 +31,7 @@ package() {
sha512sums="
4b3fe1d2bd6eab1048f6329741322b9dee73493f070bcb84294b6e8150d093b934b01cae74778e22536330dd97f27a119181edfd32401333a020eb3df6e2935b althttpd-202108141729.zip
d31628a3b6617cc49156fe3680c3d4f964a0b2ed7570edc23b9d52ed6fe7693022067a051b60d2fcb5f695be5a3daa8589fa9ba3c1ac12bd03306925e8a10015 10-allow-filename-plus-sign.patch
+9c6acaaa259abb5a9f404d12b27e3b9659064f78f5951c10ee26c67de4f2c775e5223129f640916703a25a96517bd1eb84b7a76e3bc86341f73e12fc121d1e89 20-force-GMT-headers.patch
aeb1252915176d11cddb1ff5f1c13f532bb3df8f52760f71ae087fde90a4d4422cc65570a59adac12232dacc5aed67a673790a019a3d53203899b7909ca8503b althttpd.confd
f21867430470b836d97d60215d9dda835125140cced3bb9c856349228572f2c73ac0574d3f705d72938879fc2b5a37855768a5f7de5c29943e3aa6ead5d72d9c althttpd.initd
"