The url handlers were declared with local scope, meaning local to the
lua script file I assume. Since the interface doesn't wait at the end
of the lua script anymore, they would fall out of scope after interface
initialization. Then, when the interface was first accessed, garbage
collection was somehow triggered, unregistering all url callbacks,
incidentally triggering a deadlock.
Fixes #6673
close_tag = "?>"
-- TODO: use internal VLC mime lookup function for mimes not included here
-local mimes = {
+mimes = {
txt = "text/plain",
json = "text/plain",
html = "text/html",
end
package.path = oldpath
end
-local files = {}
+files = {}
local function load_dir(dir,root)
local root = root or "/"
local has_index = false
password = vlc.var.inherit(nil,"http-password")
h = vlc.httpd()
load_dir( http_dir )
-local a = h:handler("/art",nil,password,callback_art,nil)
+a = h:handler("/art",nil,password,callback_art,nil)