# HG changeset patch # User Waqas Hussain # Date 1294190597 -18000 # Node ID b840c4c77b923db50809fcd304492e31bbad67c1 # Parent 95ccbd5e280fac389701289c66dda2fdb1c2b025 net.httpserver: Decode percent-encoded characters in URL path. diff -r 95ccbd5e280f -r b840c4c77b92 net/httpserver.lua --- a/net/httpserver.lua Wed Jan 05 06:16:27 2011 +0500 +++ b/net/httpserver.lua Wed Jan 05 06:23:17 2011 +0500 @@ -119,6 +119,7 @@ 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