Do not concatenate the yet undefined mtime variable to avoid a controller
error with backtrace.
Fixes: b3642f476 ("luci-app-nlbwmon: add proper file names for json and csv exports.")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
json = "application/json"
}
- local filename = "data." .. mtype
-
local args = { }
local mtype = http.formvalue("type") or "json"
local delim = http.formvalue("delim") or ","
end
http.prepare_content(types[mtype])
- http.header("Content-Disposition", "attachment; filename=\"%s\"" % filename)
+ http.header("Content-Disposition", "attachment; filename=\"data.%s\"" % mtype)
exec("/usr/sbin/nlbw", args, http.write)
end