aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-08-21 21:03:20 +0200
committerKim Alvefur <zash@zash.se>2012-08-21 21:03:20 +0200
commit76c09d2ad1a5affdad1aec884bc84bac26d62496 (patch)
tree82e468e214860e9395d109a13889760619dc8de6
parent63c4de5955eac5e8b2163d515789969b795aa31f (diff)
downloadprosody-76c09d2ad1a5affdad1aec884bc84bac26d62496.tar.gz
prosody-76c09d2ad1a5affdad1aec884bc84bac26d62496.zip
mod_http: Don't produce paths with double / if a module is set to serve /
-rw-r--r--plugins/mod_http.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 53993f29..b36ddb4d 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -30,6 +30,9 @@ local function get_http_event(host, app_path, key)
if method:sub(1,1) == "/" then
return nil;
end
+ if app_path == "/" and path:sub(1,1) == "/" then
+ app_path = "";
+ end
return method:upper().." "..host..app_path..path;
end