aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index a13b689b..43d65b38 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -160,7 +160,13 @@ function module.add_host(module)
local streaming = event.item.streaming_uploads;
- for key, handler in pairs(event.item.route or {}) do
+ if not event.item.route then
+ -- TODO: Link to docs
+ module:log("error", "HTTP app %q provides no 'route', a typo or mistake?", app_name);
+ return;
+ end
+
+ for key, handler in pairs(event.item.route) do
local event_name = get_http_event(host, app_path, key);
if event_name then
local method = event_name:match("^%S+");