Created
November 25, 2010 16:55
-
-
Save saga/715632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module(..., package.seeall) | |
-- Source: http://keplerproject.github.com/wsapi/manual.html | |
function run(wsapi_env) | |
local headers = { ["Content-type"] = "text/html" } | |
local function hello_text() | |
local testStr = "aabb" | |
local testStr2 = "ccdd" | |
local result = "" | |
for i=1, 10000 do | |
result = result .. testStr | |
result = result .. testStr2 | |
end | |
coroutine.yield("<html><body>") | |
coroutine.yield("<p>Hello Wsapi!</p>") | |
coroutine.yield("<p>PATH_INFO: " .. wsapi_env.PATH_INFO .. "</p>") | |
coroutine.yield("<p>SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "</p>") | |
coroutine.yield("<br/>" .. result) | |
coroutine.yield("</body></html>") | |
end | |
return 200, headers, coroutine.wrap(hello_text) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment