mod_http_upload: Say Hello to anyone opening the "bare" HTTP URL (helpful to show that module is loaded correctly)
--- a/mod_http_upload/mod_http_upload.lua Fri Oct 30 17:47:48 2015 +0100
+++ b/mod_http_upload/mod_http_upload.lua Sun Nov 01 18:12:49 2015 +0100
@@ -161,8 +161,15 @@
return serve_uploaded_files(event, path);
end
+local function serve_hello(event)
+ event.response.headers.content_type = "text/html;charset=utf-8"
+ return "<!DOCTYPE html>\n<h1>Hello from mod_"..module.name.."!</h1>\n";
+end
+
module:provides("http", {
route = {
+ ["GET"] = serve_hello;
+ ["GET /"] = serve_hello;
["GET /*"] = serve_uploaded_files;
["HEAD /*"] = serve_head;
["PUT /*"] = upload_data;