comparison src/luan/modules/http/tools/run.luan @ 1124:ea7112e9eb1d

remove env from run.luan
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 21 Aug 2017 12:06:19 -0600
parents e2eb55d86bb2
children 0842b9b570f8
comparison
equal deleted inserted replaced
1123:f2eb8295033f 1124:ea7112e9eb1d
82 local code = Http.request.parameter.code 82 local code = Http.request.parameter.code
83 if code == nil then 83 if code == nil then
84 form() 84 form()
85 return 85 return
86 end 86 end
87 local env = {
88 request = Http.request;
89 response = Http.response;
90 }
91 try { 87 try {
92 function() 88 function()
93 local run = load(code,"<web_run>",env) 89 local run = load(code,"<web_run>")
94 run() 90 run()
95 end; 91 end;
96 catch = function(e) 92 catch = function(e)
97 Http.response.reset() 93 Http.response.reset()
98 Http.response.header.content_type = "text/plain" 94 Http.response.header.content_type = "text/plain"