mod_http_files: Avoid using inode in etag, fix #1498 0.11
authorKim Alvefur <zash@zash.se>
Sat, 25 Apr 2020 20:55:00 +0200
branch0.11
changeset 10780 8f3b87eaec49
parent 10760 a026e4f45f3f
child 10781 3695904d2854
mod_http_files: Avoid using inode in etag, fix #1498
plugins/mod_http_files.lua
--- a/plugins/mod_http_files.lua	Thu Apr 23 13:44:47 2020 +0100
+++ b/plugins/mod_http_files.lua	Sat Apr 25 20:55:00 2020 +0200
@@ -112,7 +112,7 @@
 		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