diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 3 | ||||
-rw-r--r-- | libs/http/luasrc/http/protocol.lua | 1 | ||||
-rwxr-xr-x | libs/httpd/host/runluci | 6 | ||||
-rw-r--r-- | libs/httpd/luasrc/httpd/handler/luci.lua | 4 | ||||
-rw-r--r-- | libs/sgi-webuci/root/usr/lib/boa/luci.lua | 4 | ||||
-rw-r--r-- | libs/uci/luasrc/model/uci.lua | 2 |
6 files changed, 8 insertions, 12 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 9393c46a47..12bf18c2ad 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -29,10 +29,9 @@ module("luci.cbi", package.seeall) require("luci.template") require("luci.util") require("luci.http") -require("luci.model.uci") require("luci.uvl") -local uci = luci.model.uci +local uci = require("luci.model.uci") local class = luci.util.class local instanceof = luci.util.instanceof diff --git a/libs/http/luasrc/http/protocol.lua b/libs/http/luasrc/http/protocol.lua index c80380e97d..fd0a046f6b 100644 --- a/libs/http/luasrc/http/protocol.lua +++ b/libs/http/luasrc/http/protocol.lua @@ -672,6 +672,7 @@ end statusmsg = { [200] = "OK", [301] = "Moved Permanently", + [302] = "Found", [304] = "Not Modified", [400] = "Bad Request", [403] = "Forbidden", diff --git a/libs/httpd/host/runluci b/libs/httpd/host/runluci index 5a7e8fd6fc..f150cae8d6 100755 --- a/libs/httpd/host/runluci +++ b/libs/httpd/host/runluci @@ -17,9 +17,9 @@ vhost = luci.httpd.server.VHost() server:set_default_vhost(vhost) -if pcall(require, "uci") and pcall(require, "luci.model.uci") then - luci.model.uci.cursor = function(config, ...) - return uci.cursor(config or SYSROOT .. "/etc/config", ...) +if pcall(require, "uci2") and pcall(require, "luci.model.uci") then + luci.model.uci.cursor = function(config, save) + return uci2.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci") end end diff --git a/libs/httpd/luasrc/httpd/handler/luci.lua b/libs/httpd/luasrc/httpd/handler/luci.lua index ac3ed78d0a..320ab4c10e 100644 --- a/libs/httpd/luasrc/httpd/handler/luci.lua +++ b/libs/httpd/luasrc/httpd/handler/luci.lua @@ -93,9 +93,5 @@ function Luci.handle_get(self, request, sourcein, sinkerr) end end - headers["Expires"] = luci.http.protocol.date.to_http( os.time() ) - headers["Date"] = headers["Expires"] - headers["Cache-Control"] = "no-cache" - return Response(status, headers), iter end diff --git a/libs/sgi-webuci/root/usr/lib/boa/luci.lua b/libs/sgi-webuci/root/usr/lib/boa/luci.lua index c7ac168452..387d577d60 100644 --- a/libs/sgi-webuci/root/usr/lib/boa/luci.lua +++ b/libs/sgi-webuci/root/usr/lib/boa/luci.lua @@ -25,8 +25,8 @@ function init(path) if (root ~= '/') then -- Entering dummy mode luci.model.uci.cursor = function(config, ...) - return uci.cursor(config or root .. "/etc/config", ...) - end + return uci2.cursor(config or root .. "/etc/config", ...) + end luci.sys.hostname = function() return "" end luci.sys.loadavg = function() return 0,0,0,0,0 end diff --git a/libs/uci/luasrc/model/uci.lua b/libs/uci/luasrc/model/uci.lua index 333abf4072..de885808ac 100644 --- a/libs/uci/luasrc/model/uci.lua +++ b/libs/uci/luasrc/model/uci.lua @@ -23,7 +23,7 @@ See the License for the specific language governing permissions and limitations under the License. ]]-- -local uci = require "uci" +local uci = require "uci2" local util = require "luci.util" local table = require "table" |