Comparison

plugins/mod_http_files.lua @ 5256:a77c6eba461e

mod_http_files: Only match on modification date when if-none-match is not present
author Kim Alvefur <zash@zash.se>
date Fri, 21 Dec 2012 08:27:14 +0100
parent 5255:bf34f1ee08ee
child 5257:b125892e187c
comparison
equal deleted inserted replaced
5255:bf34f1ee08ee 5256:a77c6eba461e
66 response_headers.etag = etag; 66 response_headers.etag = etag;
67 67
68 local if_none_match = request_headers.if_none_match 68 local if_none_match = request_headers.if_none_match
69 local if_modified_since = request_headers.if_modified_since; 69 local if_modified_since = request_headers.if_modified_since;
70 if etag == if_none_match 70 if etag == if_none_match
71 or last_modified == if_modified_since then 71 or (not if_none_match and last_modified == if_modified_since) then
72 return 304; 72 return 304;
73 end 73 end
74 74
75 local data = cache[path]; 75 local data = cache[path];
76 if data and data.etag == etag then 76 if data and data.etag == etag then