# HG changeset patch # User Kim Alvefur # Date 1446397969 -3600 # Node ID ff95d983940ca0522f6f276a566a577c3dc04670 # Parent 2a5a44d5b9356f1316058c1fc8c814f7193035af mod_http_upload: Say Hello to anyone opening the "bare" HTTP URL (helpful to show that module is loaded correctly) diff -r 2a5a44d5b935 -r ff95d983940c mod_http_upload/mod_http_upload.lua --- 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 "\n

Hello from mod_"..module.name.."!

\n"; +end + module:provides("http", { route = { + ["GET"] = serve_hello; + ["GET /"] = serve_hello; ["GET /*"] = serve_uploaded_files; ["HEAD /*"] = serve_head; ["PUT /*"] = upload_data;