wsapi.cgi(1)

wsapi.cgi1

Cgi wrapper for wsapi based dynamic pages

Usage

#!/usr/bin/env wsapi.cgi

Overview

A sample dynamic page follows:

    #!/usr/bin/env wsapi.cgi
    module(..., package.seeall)
    function run(wsapi_env)
      local headers = { ["Content-type"] = "text/html" }
      local function hello_text()
        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("</body></html>")
      end
      return 200, headers, coroutine.wrap(hello_text)
    end

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0–12
  2. 13

Author

Enrico Tassi <[email protected]>

From lua-wsapi 1.6.1-3+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.