From 860da0f4b4d9d6ca647ff0a3b15389b41557dec4 Mon Sep 17 00:00:00 2001 From: LordHelmchen Date: Thu, 16 Mar 2017 16:33:28 +0100 Subject: [PATCH] make protect_segment in url.lua rfc compliant percent-encode uppercase see https://tools.ietf.org/html/rfc3986#section-6.2.2 --- src/url.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/url.lua b/src/url.lua index b59960a..3290ce7 100644 --- a/src/url.lua +++ b/src/url.lua @@ -59,7 +59,7 @@ local segment_set = make_set { local function protect_segment(s) return string.gsub(s, "([^A-Za-z0-9_])", function (c) if segment_set[c] then return c - else return string.format("%%%02x", string.byte(c)) end + else return string.format("%%%02X", string.byte(c)) end end) end