]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/civetweb/test/page3.lua
import quincy beta 17.1.0
[ceph.git] / ceph / src / civetweb / test / page3.lua
diff --git a/ceph/src/civetweb/test/page3.lua b/ceph/src/civetweb/test/page3.lua
deleted file mode 100644 (file)
index fec6899..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
--- This test checks if a query string has been given.\r
--- It sends the file identified by the query string.\r
--- Do not use it in a real server in this way!\r
-\r
-if not mg.request_info.query_string then\r
-    mg.write("HTTP/1.0 200 OK\r\n")\r
-    mg.write("Connection: close\r\n")\r
-    mg.write("Content-Type: text/html; charset=utf-8\r\n")\r
-    mg.write("\r\n")\r
-    mg.write("<html><head><title>Civetweb Lua script test page 3</title></head>\r\n")\r
-    mg.write("<body>No query string!</body></html>\r\n")\r
-elseif mg.request_info.query_string:match("/") or mg.request_info.query_string:match("\\") then\r
-    mg.write("HTTP/1.0 403 Forbidden\r\n")\r
-    mg.write("Connection: close\r\n")\r
-    mg.write("Content-Type: text/html; charset=utf-8\r\n")\r
-    mg.write("\r\n")\r
-    mg.write("<html><head><title>Civetweb Lua script test page 3</title></head>\r\n")\r
-    mg.write("<body>No access!</body></html>\r\n")\r
-else\r
-    file = mg.get_var(mg.request_info.query_string, "file");\r
-    if not file then\r
-        mg.write("HTTP/1.0 400 Bad Request\r\n")\r
-        mg.write("Connection: close\r\n")\r
-        mg.write("Content-Type: text/html; charset=utf-8\r\n")\r
-        mg.write("\r\n")\r
-        mg.write("<html>\r\n<head><title>Civetweb Lua script test page 3</title></head>\r\n")\r
-        mg.write("<body>\r\nQuery string does not contain a 'file' variable.<br>\r\n")\r
-        mg.write("Try <a href=\"?file=page3.lua&somevar=something\">?file=page3.lua&somevar=something</a>\r\n")\r
-        mg.write("</body>\r\n</html>\r\n")\r
-    else\r
-        filename = mg.document_root .. "/" .. file\r
-        mg.send_file(filename)\r
-    end\r
-end\r