return function (connection, req, args) local function showCars(nr) if not nr then return end connection:send([===[]===]) if nr == "1" then return end connection:send([===[]===]) if nr == "2" then return end connection:send([===[]===]) if nr == "3" then return end connection:send([===[]===]) if nr == "4" then return end connection:send([===[]===]) if nr == "5" then return end connection:send([===[]===]) end dofile("httpserver-header.lc")(connection, 200, 'html') connection:send([===[
This page loads "large" images of fancy cars. It is meant to serve as a stress test for nodemcu-httpserver.
It works with three embedded images of cars, but the server crashes with four. Select the number of cars you want to see below.
Whoever manages to modify nodemcu-httpserver to load all four images without crashing wins a prize!
OK I guess I win the prize, as now you can load five cars.
Cheers HHHartmann
choose: show one car show two cars show three cars show four cars show five cars show six cars
]===]) showCars(args.n) connection:send([===[ ]===]) end