1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

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
This commit is contained in:
Tobias C. Berner 2020-04-29 19:09:53 +00:00
parent 36afdb340a
commit e346c38a35
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=533389
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= prosody
PORTVERSION= 0.11.5
PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= https://prosody.im/downloads/source/

View File

@ -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