modules/admin-full, modules/admin-mini: set appropriate mime type for luci-flash...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 17 Jun 2009 12:56:55 +0000 (12:56 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 17 Jun 2009 12:56:55 +0000 (12:56 +0000)
modules/admin-full/luasrc/controller/admin/system.lua
modules/admin-mini/luasrc/controller/mini/system.lua

index 9f66f17..39fe16a 100644 (file)
@@ -266,6 +266,9 @@ function action_upgrade()
        -- previous pages should arrange the stuff as required.
        if step == 4 then
                if has_platform and has_image and has_support then
        -- previous pages should arrange the stuff as required.
        if step == 4 then
                if has_platform and has_image and has_support then
+                       -- Mimetype text/plain
+                       luci.http.prepare_content("text/plain")
+
                        -- Now invoke sysupgrade
                        local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
                        local fd = io.popen("/sbin/luci-flash %s %q" %{
                        -- Now invoke sysupgrade
                        local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
                        local fd = io.popen("/sbin/luci-flash %s %q" %{
index 3aae6fa..c7bacb2 100644 (file)
@@ -149,6 +149,9 @@ function action_upgrade()
        -- previous pages should arrange the stuff as required.
        if step == 4 then
                if has_platform and has_image and has_support then
        -- previous pages should arrange the stuff as required.
        if step == 4 then
                if has_platform and has_image and has_support then
+                       -- Mimetype text/plain
+                       luci.http.prepare_content("text/plain")
+
                        -- Now invoke sysupgrade
                        local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
                        local fd = io.popen("/sbin/luci-flash %s %q" %{
                        -- Now invoke sysupgrade
                        local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
                        local fd = io.popen("/sbin/luci-flash %s %q" %{