From ed8184a2c57bb5933a21730208aa13c2c60cfd07 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 5 Jan 2011 06:23:17 +0500 Subject: net.httpserver: Decode percent-encoded characters in URL path. --- net/httpserver.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'net') 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 -- cgit v1.2.3