Remove remaining references to boa and lucid
[project/luci.git] / libs / sgi-cgi / luasrc / sgi / cgi.lua
index f2c6f69..04ae9aa 100644 (file)
@@ -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