mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-07-01 05:31:23 +02:00
22 lines
446 B
Lua
22 lines
446 B
Lua
|
local M = {}
|
||
|
|
||
|
local urlcode = require("util.urlcode")
|
||
|
|
||
|
function M:new()
|
||
|
--parse os.getenv("QUERY_STRING")
|
||
|
--parse os.getenv("REPLY")?
|
||
|
--parse arg
|
||
|
|
||
|
local qs = os.getenv("QUERY_STRING")
|
||
|
local urlargs = {}
|
||
|
urlcode.parsequery(qs, urlargs)
|
||
|
|
||
|
--supplement urlargs with arguments from the command-line
|
||
|
for _, v in ipairs(arg) do
|
||
|
local split = v:find("=")
|
||
|
if split ~= nil then
|
||
|
urlargs[v:sub(1, split - 1)] = v:sub(split + 1)
|
||
|
end
|
||
|
end
|
||
|
end
|