From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/civetweb/test/page6.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/civetweb/test/page6.lua (limited to 'src/civetweb/test/page6.lua') diff --git a/src/civetweb/test/page6.lua b/src/civetweb/test/page6.lua new file mode 100644 index 00000000..dc304397 --- /dev/null +++ b/src/civetweb/test/page6.lua @@ -0,0 +1,16 @@ +mg.write("HTTP/1.0 200 OK\r\n") +mg.write("Content-Type: text/plain\r\n") +mg.write("\r\n") +mg.write(mg.request_info.request_method .. " " .. mg.request_info.request_uri .. " HTTP/" .. mg.request_info.http_version .. "\r\n") +for k,v in pairs(mg.request_info.http_headers) do + mg.write(k .. ": " .. v .. "\r\n") +end +mg.write("\r\n") + +repeat + local r = mg.read() + if (r) then + mg.write(r) + end +until not r + -- cgit v1.2.3