|
@ -1,13 +1,13 @@ |
|
|
#!/usr/bin/env lua |
|
|
#!/usr/bin/env lua |
|
|
|
|
|
|
|
|
local fcgi = require"fcgi" |
|
|
local fcgi = require"fcgi" |
|
|
local yqtemplate = require"yqtemplate" |
|
|
|
|
|
|
|
|
local app_yqtemplate = require"yqtemplate" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while fcgi.accept() do |
|
|
while fcgi.accept() do |
|
|
app = fcgi.getenv("DOCUMENT_URI"):sub(6) |
|
|
app = fcgi.getenv("DOCUMENT_URI"):sub(6) |
|
|
if app = "yqtemplate" then |
|
|
if app = "yqtemplate" then |
|
|
yqtemplate(fcgi) |
|
|
|
|
|
|
|
|
app_yqtemplate(fcgi) |
|
|
else |
|
|
else |
|
|
fcgi.print"Content-Type: text/plain; charset=utf-8\r\n\r\n" |
|
|
fcgi.print"Content-Type: text/plain; charset=utf-8\r\n\r\n" |
|
|
fcgi.print("Unknown CGI application: `" .. app .. "'\n") |
|
|
fcgi.print("Unknown CGI application: `" .. app .. "'\n") |
|
|