diff --git a/NEWS b/NEWS index c339bd202988b6541a59aaa5bb24e3c6c0e79838..472c15bdfb0dc7252e007ff5f79b0c3aea69fec4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +Knot Resolver 1.3.1 (2017-06-xx) +================================ + +Bugfixes +-------- +- modules/http: fix finding the static files (bug from 1.3.0) + + Knot Resolver 1.3.0 (2017-06-13) ================================ diff --git a/modules/http/http.lua b/modules/http/http.lua index f064ba98b573044d24273677933e6d2e63116316..d48a1d15161821fe24908f6f6a83f53450e72a39 100644 --- a/modules/http/http.lua +++ b/modules/http/http.lua @@ -34,9 +34,10 @@ local mime_types = { -- Preload static contents, nothing on runtime will touch the disk local function pgload(relpath, modname) if not modname then modname = 'http' end - local fp, err = io.open(string.format('%s/%s/%s', moduledir, modname, relpath), 'r') + local mdir = moduledir() + local fp, err = io.open(string.format('%s/%s/%s', mdir, modname, relpath), 'r') if not fp then - fp, err = io.open(string.format('%s/%s/static/%s', moduledir, modname, relpath), 'r') + fp, err = io.open(string.format('%s/%s/static/%s', mdir, modname, relpath), 'r') end if not fp then error(err) end local data = fp:read('*all')