summaryrefslogtreecommitdiffhomepage
path: root/libs/httpd/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-06-25 21:19:10 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-06-25 21:19:10 +0000
commitb8faf24d5c8d6029091f70cd7588cff55f67af0b (patch)
tree7f1c1b977be5e3c456703c0cbeda7cbda369b319 /libs/httpd/luasrc
parent231cd0b89d14a49a4b5de477046be01a9d365fb4 (diff)
* luci/httpd: fix 500 error case in luci handler, added copyright stuff
Diffstat (limited to 'libs/httpd/luasrc')
-rw-r--r--libs/httpd/luasrc/httpd/handler/luci.lua20
-rw-r--r--libs/httpd/luasrc/httpd/server.lua1
2 files changed, 19 insertions, 2 deletions
diff --git a/libs/httpd/luasrc/httpd/handler/luci.lua b/libs/httpd/luasrc/httpd/handler/luci.lua
index 35f832d453..49a9abc0de 100644
--- a/libs/httpd/luasrc/httpd/handler/luci.lua
+++ b/libs/httpd/luasrc/httpd/handler/luci.lua
@@ -1,4 +1,20 @@
+--[[
+
+HTTP server implementation for LuCI - luci handler
+(c) 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+]]--
+
module("luci.httpd.handler.luci", package.seeall)
+
require("luci.dispatcher")
require("luci.http")
require("ltn12")
@@ -40,7 +56,7 @@ function Luci.handle_get(self, request, sourcein, sinkerr)
status = 500
headers["Content-Type"] = "text/plain"
local err = {id}
- return status, headers, function() local x = table.remove(err) return x end
+ return Response( status, headers ), function() return table.remove(err) end
end
if id == 1 then
@@ -64,4 +80,4 @@ function Luci.handle_get(self, request, sourcein, sinkerr)
end
return Response(status, headers), iter
-end \ No newline at end of file
+end
diff --git a/libs/httpd/luasrc/httpd/server.lua b/libs/httpd/luasrc/httpd/server.lua
index 431a946c03..dd5b81548e 100644
--- a/libs/httpd/luasrc/httpd/server.lua
+++ b/libs/httpd/luasrc/httpd/server.lua
@@ -2,6 +2,7 @@
HTTP server implementation for LuCI - helper class
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
+(c) 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.