From d31b2d2c89e1db8d635484b9c23630d88e6339ef Mon Sep 17 00:00:00 2001 From: Marcos Kirsch Date: Mon, 15 Feb 2016 22:31:48 -0600 Subject: [PATCH] No need to yield. Conditionally show form. Updated title. --- http/args.lua | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/http/args.lua b/http/args.lua index 24ea28a..ab565ad 100644 --- a/http/args.lua +++ b/http/args.lua @@ -1,26 +1,25 @@ -return function (connection, args) +return function (connection, req, args) dofile("httpserver-header.lc")(connection, 200, 'html') connection:send([===[ - Arguments

Arguments

-
- First name:

- Last name:

- MaleFemale
- -
+ Arguments by GET

Arguments by GET

]===]) - coroutine.yield() - if args["submit"] ~= nil then + if args.submit == nil then + connection:send([===[ +
+ First name:

+ Last name:

+ MaleFemale
+ +
+ ]===]) + else connection:send("

Received the following values:

\n") end - - connection:send("\n") - + connection:send("") end