Software /
code /
prosody
Comparison
net/http/files.lua @ 10778:a62b981db0e2
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 Apr 2020 20:49:31 +0200 |
parent | 10776:plugins/mod_http_files.lua@8f3b87eaec49 |
parent | 10563:plugins/mod_http_files.lua@e8db377a2983 |
child | 11120:b2331f3dfeea |
comparison
equal
deleted
inserted
replaced
10775:1641e33f1d36 | 10778:a62b981db0e2 |
---|---|
78 local request_headers, response_headers = request.headers, response.headers; | 78 local request_headers, response_headers = request.headers, response.headers; |
79 | 79 |
80 local last_modified = os_date('!%a, %d %b %Y %H:%M:%S GMT', attr.modification); | 80 local last_modified = os_date('!%a, %d %b %Y %H:%M:%S GMT', attr.modification); |
81 response_headers.last_modified = last_modified; | 81 response_headers.last_modified = last_modified; |
82 | 82 |
83 local etag = ('"%02x-%x-%x-%x"'):format(attr.dev or 0, attr.ino or 0, attr.size or 0, attr.modification or 0); | 83 local etag = ('"%x-%x-%x"'):format(attr.change or 0, attr.size or 0, attr.modification or 0); |
84 response_headers.etag = etag; | 84 response_headers.etag = etag; |
85 | 85 |
86 local if_none_match = request_headers.if_none_match | 86 local if_none_match = request_headers.if_none_match |
87 local if_modified_since = request_headers.if_modified_since; | 87 local if_modified_since = request_headers.if_modified_since; |
88 if etag == if_none_match | 88 if etag == if_none_match |