Merge pull request #1814 from Ansuel/lua-interpreter
authorJo-Philipp Wich <jo@mein.io>
Wed, 23 May 2018 07:58:53 +0000 (09:58 +0200)
committerGitHub <noreply@github.com>
Wed, 23 May 2018 07:58:53 +0000 (09:58 +0200)
luci-base: fix dispacher fail

modules/luci-base/luasrc/dispatcher.lua

index 45e1e30..2c58b0a 100644 (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] = "?"