Comparison

mod_http_upload/mod_http_upload.lua @ 2947:faec53f4b31e

mod_http_upload: Include the current VirtualHost name in greeting to help with debugging
author Kim Alvefur <zash@zash.se>
date Sun, 25 Mar 2018 20:27:14 +0200
parent 2800:8d9aed6d1f87
child 3011:995836ee4f26
comparison
equal deleted inserted replaced
2946:dfac28504e86 2947:faec53f4b31e
308 return serve_uploaded_files(event, path); 308 return serve_uploaded_files(event, path);
309 end 309 end
310 310
311 local function serve_hello(event) 311 local function serve_hello(event)
312 event.response.headers.content_type = "text/html;charset=utf-8" 312 event.response.headers.content_type = "text/html;charset=utf-8"
313 return "<!DOCTYPE html>\n<h1>Hello from mod_"..module.name.."!</h1>\n"; 313 return "<!DOCTYPE html>\n<h1>Hello from mod_"..module.name.." on "..module.host.."!</h1>\n";
314 end 314 end
315 315
316 module:provides("http", { 316 module:provides("http", {
317 route = { 317 route = {
318 ["GET"] = serve_hello; 318 ["GET"] = serve_hello;