plugins/mod_http_files.lua
changeset 8760 861a7d6c12d8
parent 7994 35a02ba83af2
child 9465 6489d75ff1d6
equal deleted inserted replaced
8744:0fd63ed1f647 8760:861a7d6c12d8
   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