diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-04 20:35:44 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-04 20:35:44 +0100 |
commit | 964ee27096880d45010375e937ef3f1702d128b7 (patch) | |
tree | 0958cf0ca9ef7710ae23b6a705ff17396604783b /net | |
parent | ef5e994b1f4303d7940194fc980f5b5e94654c76 (diff) | |
download | prosody-964ee27096880d45010375e937ef3f1702d128b7.tar.gz prosody-964ee27096880d45010375e937ef3f1702d128b7.zip |
net.httpserver: Fix for urlencoding to always produce 2 digits
Diffstat (limited to 'net')
-rw-r--r-- | net/httpserver.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua index 12328b29..af23a91d 100644 --- a/net/httpserver.lua +++ b/net/httpserver.lua @@ -11,7 +11,7 @@ local t_insert, t_concat = table.insert, table.concat; local s_match, s_gmatch = string.match, string.gmatch; local tonumber, tostring, pairs = tonumber, tostring, pairs; -local urlencode = function (s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end +local urlencode = function (s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end local log = require "util.logger".init("httpserver"); |