diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-04-30 03:09:53 +0800 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-04-30 03:09:53 +0800 |
commit | e346c38a3587504fbc623462f256fa0c6690b047 (patch) | |
tree | 58a6f9cbc9e487a3e62d5f84ba293e4f19b25fdb /net-im | |
parent | 36afdb340a70df1d135ca9dc084415ef0d469c31 (diff) | |
download | freebsd-ports-gnome-e346c38a3587504fbc623462f256fa0c6690b047.tar.gz freebsd-ports-gnome-e346c38a3587504fbc623462f256fa0c6690b047.tar.zst freebsd-ports-gnome-e346c38a3587504fbc623462f256fa0c6690b047.zip |
net-im/prosody: Fix http files download
net-im/prosody: fix ETag creation
* Include patch from upstream to fix crash in mod_http_files
when encountering large device- or inode-numbers [1]
[1] https://issues.prosody.im/1498
PR: 244618
Submitted by: Thomas Morper <thomas@beingboiled.info> (maintainer)
Reported by: rozhuk.im@gmail.com
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/prosody/Makefile | 1 | ||||
-rw-r--r-- | net-im/prosody/files/patch-plugins_mod__http__files.lua | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile index 7bad326ce165..583ee401f8db 100644 --- a/net-im/prosody/Makefile +++ b/net-im/prosody/Makefile @@ -3,6 +3,7 @@ PORTNAME= prosody PORTVERSION= 0.11.5 +PORTREVISION= 1 CATEGORIES= net-im MASTER_SITES= https://prosody.im/downloads/source/ diff --git a/net-im/prosody/files/patch-plugins_mod__http__files.lua b/net-im/prosody/files/patch-plugins_mod__http__files.lua new file mode 100644 index 000000000000..ae327ea1ae60 --- /dev/null +++ b/net-im/prosody/files/patch-plugins_mod__http__files.lua @@ -0,0 +1,11 @@ +--- plugins/mod_http_files.lua.orig 2020-01-19 15:50:32 UTC ++++ plugins/mod_http_files.lua +@@ -112,7 +112,7 @@ function serve(opts) + local last_modified = os_date('!%a, %d %b %Y %H:%M:%S GMT', attr.modification); + response_headers.last_modified = last_modified; + +- local etag = ('"%02x-%x-%x-%x"'):format(attr.dev or 0, attr.ino or 0, attr.size or 0, attr.modification or 0); ++ local etag = ('"%x-%x-%x"'):format(attr.change or 0, attr.size or 0, attr.modification or 0); + response_headers.etag = etag; + + local if_none_match = request_headers.if_none_match |