blob: 2cc874b958fb898ec42ec56c71eff015d2c6902e [file] [log] [blame]
PiBa-NL4dc3f3b2018-12-23 21:21:51 +01001
2local data = "abcdefghijklmnopqrstuvwxyz"
3local responseblob = ""
4for i = 1,10000 do
5 responseblob = responseblob .. "\r\n" .. i .. data:sub(1, math.floor(i % 27))
6end
7
8http01applet = function(applet)
9 local response = responseblob
10 applet:set_status(200)
11 applet:add_header("Content-Type", "application/javascript")
12 applet:add_header("Content-Length", string.len(response)*10)
13 applet:start_response()
14 for i = 1,10 do
15 applet:send(response)
16 end
17end
18
19core.register_service("fileloader-http01", "http", http01applet)