# HG changeset patch # User Kim Alvefur # Date 1709050536 -3600 # Node ID dba7073f14520c75f3861b6d472a211cdbe740c1 # Parent 783706350faa83d5778ee5e31c46e30d2a054fa5# Parent 360e05f33835dbac01dfd388e30f801094abf07d Merge 0.12->trunk diff -r 783706350faa -r dba7073f1452 net/http/files.lua --- a/net/http/files.lua Sat Feb 24 17:45:50 2024 +0100 +++ b/net/http/files.lua Tue Feb 27 17:15:36 2024 +0100 @@ -58,7 +58,7 @@ local cache = new_cache(opts.cache_size or 256); local cache_max_file_size = tonumber(opts.cache_max_file_size) or 1024 -- luacheck: ignore 431 - local base_path = opts.path; + local base_path = assert(opts.path, "invalid argument to net.http.files.path(), missing required 'path'"); local dir_indices = opts.index_files or { "index.html", "index.htm" }; local directory_index = opts.directory_index; local function serve_file(event, path)