Merge pull request #1814 from Ansuel/lua-interpreter

luci-base: fix dispacher fail
This commit is contained in:
Jo-Philipp Wich 2018-05-23 09:58:53 +02:00 committed by GitHub
commit 7acacf2cf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -358,7 +358,7 @@ function dispatch(request)
elseif key == "REQUEST_URI" then
return build_url(unpack(ctx.requestpath))
elseif key == "FULL_REQUEST_URI" then
local url = { http.getenv("SCRIPT_NAME"), http.getenv("PATH_INFO") }
local url = { http.getenv("SCRIPT_NAME") or "" , http.getenv("PATH_INFO") }
local query = http.getenv("QUERY_STRING")
if query and #query > 0 then
url[#url+1] = "?"