Add initial mod_httpserver for serving static content
[prosody.git] / prosody
diff --git a/prosody b/prosody
index 3b95663f59c1b14f9a77a6c0b058b1b129b8c558..98d15da2a6c3783c5b6f3b31dd26e38eb7101308 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -115,7 +115,7 @@ function mkdir(path)
        path = path:gsub("/", path_separator);
        local x = io.popen("mkdir \""..path.."\" 2>&1"):read("*a");
 end
-function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end
+function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end
 function mkdirs(host)
        if not _mkdir[host] then
                local host_dir = string.format("%s/%s", data_path, encode(host));