Software / code / prosody
Comparison
plugins/mod_http_files.lua @ 8759:9e839fb4541a
Merge 0.10->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 24 Apr 2018 22:59:41 +0100 |
| parent | 8757:861a7d6c12d8 |
| child | 9462:6489d75ff1d6 |
comparison
equal
deleted
inserted
replaced
| 8756:2db9c9e3adc1 | 8759:9e839fb4541a |
|---|---|
| 142 data = server._events.fire_event("directory-index", { path = request.path, full_path = full_path }); | 142 data = server._events.fire_event("directory-index", { path = request.path, full_path = full_path }); |
| 143 end | 143 end |
| 144 if not data then | 144 if not data then |
| 145 return 403; | 145 return 403; |
| 146 end | 146 end |
| 147 cache[orig_path] = { data = data, content_type = mime_map.html; etag = etag; }; | 147 cache:set(orig_path, { data = data, content_type = mime_map.html; etag = etag; }); |
| 148 response_headers.content_type = mime_map.html; | 148 response_headers.content_type = mime_map.html; |
| 149 | 149 |
| 150 else | 150 else |
| 151 local f, err = open(full_path, "rb"); | 151 local f, err = open(full_path, "rb"); |
| 152 if not f then | 152 if not f then |