diff options
author | Kim Alvefur <zash@zash.se> | 2012-05-25 03:39:45 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-05-25 03:39:45 +0200 |
commit | ee0b51c86f3f2bc28705cbb54c5d350b87b08c8c (patch) | |
tree | be79e809578b33ea771a0c2dfb261b927f82730c /plugins | |
parent | 23c837319fcf1087fa21fea2d97d2001cb777243 (diff) | |
download | prosody-ee0b51c86f3f2bc28705cbb54c5d350b87b08c8c.tar.gz prosody-ee0b51c86f3f2bc28705cbb54c5d350b87b08c8c.zip |
mod_http: Fix normalize_path('/') to not return an empty string, fixes module:http_url()
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_http.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index edd4f59d..634fb188 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -17,8 +17,8 @@ local server = require "net.http.server"; server.set_default_host(module:get_option_string("http_default_host")); local function normalize_path(path) - if path:sub(1,1) ~= "/" then path = "/"..path; end if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end + if path:sub(1,1) ~= "/" then path = "/"..path; end return path; end |