diff options
author | Steven Barth <steven@midlink.org> | 2009-04-09 13:56:04 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-04-09 13:56:04 +0000 |
commit | d3cb7ea5fdffe7792cd2b8e1129e2976e67d2533 (patch) | |
tree | 69b3ffe0037a0607382ee5ff31c3f2e2ae708f79 | |
parent | 859a3fee889026a88e7780424711235e2a1e1d5f (diff) |
Freufunk: I CAN HAZ ZEROES PLZKTHX
-rw-r--r-- | modules/freifunk/luasrc/controller/freifunk/freifunk.lua | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua index e30cdb10f..6c8911b76 100644 --- a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua +++ b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua @@ -41,16 +41,18 @@ function index() page.target = template("freifunk/contact") page.title = "Kontakt" + entry({"freifunk", "status"}, alias("freifunk", "status", "status"), "Status", 20) - local page = node("freifunk", "status") + local page = node("freifunk", "status", "status") page.target = form("freifunk/public_status") - page.title = "Status" + page.title = i18n("overview") page.order = 20 page.i18n = "admin-core" page.setuser = false page.setgroup = false entry({"freifunk", "status.json"}, call("jsonstatus")) + entry({"freifunk", "status", "zeroes"}, call("zeroes"), "Testdownload") assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, "OLSR", 30) @@ -120,6 +122,21 @@ local function fetch_olsrd() return data end +function zeroes() + local string = require "string" + local http = require "luci.http" + local zeroes = string.rep(string.char(0), 8192) + local cnt = 0 + local lim = 1024 * 1024 * 1024 + + http.prepare_content("application/x-many-zeroes") + + while cnt < lim do + http.write(zeroes) + cnt = cnt + #zeroes + end +end + function jsonstatus() local root = {} local sys = require "luci.sys" |