You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
688 B

  1. local etlua = require "etlua"
  2. local utils = require "utils"
  3. local yqtemplateform = utils.readfile("yqform.etlua")
  4. local form = etlua.compile(yqtemplateform)
  5. return {
  6. desc = "Creates Yokoka’s quest-style personal status page",
  7. run = function(fcgi)
  8. fcgi.print("Content-Type: text/html; charset=utf-8\r\n\r\n")
  9. local data = ""
  10. if fcgi.getenv("REQUEST_METHOD") == "POST" then
  11. --- @type string
  12. local content_type = fcgi.getenv("CONTENT_TYPE")
  13. local boundary = content_type:match("; boundary=(.*)$")
  14. -- local post_data = fcgi.post()
  15. data = "Content type:" .. content_type .. "\n Boundary: "..boundary.."\n"
  16. end
  17. fcgi.print(form{data = data})
  18. end
  19. }