diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-12-16 03:46:17 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-12-16 03:46:17 +0500 |
commit | d3d9a986ba588bba4f28b856f19f2a75209d3763 (patch) | |
tree | 06473e4c31217a4a04dbbada58a17c8049027f33 /prosody | |
parent | 2e83fd69f77f90552c27526f4899e6c1fed18549 (diff) | |
download | prosody-d3d9a986ba588bba4f28b856f19f2a75209d3763.tar.gz prosody-d3d9a986ba588bba4f28b856f19f2a75209d3763.zip |
Fixed URL encoding to generate %0x instead of %x
Diffstat (limited to 'prosody')
-rwxr-xr-x | prosody | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |