Diff

util/http.lua @ 9785:ff88b03c343f

util.http: Fix decoding of uppercase URL encoded chars Broken in 1af5106a2c34
author Kim Alvefur <zash@zash.se>
date Wed, 16 Jan 2019 13:53:04 +0100
parent 9759:1af5106a2c34
child 13124:f15e23840780
line wrap: on
line diff
--- a/util/http.lua	Tue Jan 15 20:08:30 2019 +0100
+++ b/util/http.lua	Wed Jan 16 13:53:04 2019 +0100
@@ -15,6 +15,7 @@
 	local u = format("%%%02x", i);
 	url_codes[c] = u;
 	url_codes[u] = c;
+	url_codes[u:upper()] = c;
 end
 local function urlencode(s)
 	return s and (s:gsub("[^a-zA-Z0-9.~_-]", url_codes));