X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fsgi-cgi%2Fluasrc%2Fsgi%2Fcgi.lua;h=04ae9aa5926b44d12d27d4ebef4d4171e0c99ead;hp=f2c6f69574ed4e612c8196f89a72b16448071fac;hb=bbb44cf245c11bc0c1d59e836007c9e8c3bfa209;hpb=b8ab3b9dacab9c6d4344c60fdb4046087a24f233 diff --git a/libs/sgi-cgi/luasrc/sgi/cgi.lua b/libs/sgi-cgi/luasrc/sgi/cgi.lua index f2c6f6957..04ae9aa59 100644 --- a/libs/sgi-cgi/luasrc/sgi/cgi.lua +++ b/libs/sgi-cgi/luasrc/sgi/cgi.lua @@ -23,6 +23,7 @@ See the License for the specific language governing permissions and limitations under the License. ]]-- +exectime = os.clock() module("luci.sgi.cgi", package.seeall) local ltn12 = require("luci.ltn12") require("nixio.util") @@ -80,13 +81,14 @@ function run() io.write(hcache) io.write("\r\n") elseif id == 4 then - io.write(data1) + io.write(tostring(data1 or "")) elseif id == 5 then io.flush() io.close() active = false elseif id == 6 then data1:copyz(nixio.stdout, data2) + data1:close() end end end