Add initial mod_httpserver for serving static content
[prosody.git] / prosody
diff --git a/prosody b/prosody
index cbbdb6d4a38e4222044a89ff8c277e528373164f..98d15da2a6c3783c5b6f3b31dd26e38eb7101308 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -1,5 +1,5 @@
 #!/usr/bin/env lua
--- Prosody IM v0.1
+-- Prosody IM v0.2
 -- Copyright (C) 2008 Matthew Wild
 -- Copyright (C) 2008 Waqas Hussain
 -- 
@@ -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));