diff options
author | Waqas Hussain <waqas20@gmail.com> | 2011-01-05 06:23:17 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2011-01-05 06:23:17 +0500 |
commit | 3546ee5491d11577dd8e50051839385a30513933 (patch) | |
tree | fe648eee894d1dcc15c68724301a9c245bc1ad37 /net/httpserver.lua | |
parent | 1e5dc701c82e6c19c58cf337647ac8dd5136c443 (diff) | |
download | prosody-3546ee5491d11577dd8e50051839385a30513933.tar.gz prosody-3546ee5491d11577dd8e50051839385a30513933.zip |
net.httpserver: Decode percent-encoded characters in URL path.
Diffstat (limited to 'net/httpserver.lua')
-rw-r--r-- | net/httpserver.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua index 4c1200ac..4be62ced 100644 --- a/net/httpserver.lua +++ b/net/httpserver.lua @@ -119,6 +119,7 @@ local function request_reader(request, data, startpos) local function success_cb(r) for k,v in pairs(r) do request[k] = v; end request.url = url_parse(request.path); + request.url.path = request.url.path and request.url.path:gsub("%%(%x%x)", function(x) return x.char(tonumber(x, 16)) end); request.body = { request.body }; call_callback(request); end |