Mercurial Hosting > luan
comparison src/luan/modules/http/tools/Shell_mod.luan @ 1152:21d157b153fe
change http parameters interface
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 04 Feb 2018 19:25:12 -0700 |
parents | bae2d0c2576c |
children | 3ef883468fd0 |
comparison
equal
deleted
inserted
replaced
1151:dbb3cb906482 | 1152:21d157b153fe |
---|---|
12 | 12 |
13 local history = {} | 13 local history = {} |
14 Shell_mod.env = {} | 14 Shell_mod.env = {} |
15 | 15 |
16 function Shell_mod.respond() | 16 function Shell_mod.respond() |
17 if Http.request.parameter.clear ~= nil then | 17 if Http.request.parameters.clear ~= nil then |
18 Http.clear_session() | 18 Http.clear_session() |
19 Http.response.send_redirect(Http.request.path) -- reload page | 19 Http.response.send_redirect(Http.request.path) -- reload page |
20 return | 20 return |
21 else | 21 else |
22 local cmd = Http.request.parameter.cmd | 22 local cmd = Http.request.parameters.cmd |
23 if cmd ~= nil then | 23 if cmd ~= nil then |
24 Io.stdout = {} | 24 Io.stdout = {} |
25 function Io.stdout.write(...) | 25 function Io.stdout.write(...) |
26 for v in Luan.values(...) do | 26 for v in Luan.values(...) do |
27 history[#history+1] = v | 27 history[#history+1] = v |