From ee0b51c86f3f2bc28705cbb54c5d350b87b08c8c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 25 May 2012 03:39:45 +0200 Subject: mod_http: Fix normalize_path('/') to not return an empty string, fixes module:http_url() --- plugins/mod_http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.3