diff options
-rw-r--r-- | src/url.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/url.lua b/src/url.lua index 1e5a3f6..d61111e 100644 --- a/src/url.lua +++ b/src/url.lua | |||
@@ -49,7 +49,7 @@ local function make_set(t) | |||
49 | return s | 49 | return s |
50 | end | 50 | end |
51 | 51 | ||
52 | -- these are allowed withing a path segment, along with alphanum | 52 | -- these are allowed within a path segment, along with alphanum |
53 | -- other characters must be escaped | 53 | -- other characters must be escaped |
54 | local segment_set = make_set { | 54 | local segment_set = make_set { |
55 | "-", "_", ".", "!", "~", "*", "'", "(", | 55 | "-", "_", ".", "!", "~", "*", "'", "(", |
@@ -59,7 +59,7 @@ local segment_set = make_set { | |||
59 | local function protect_segment(s) | 59 | local function protect_segment(s) |
60 | return string.gsub(s, "([^A-Za-z0-9_])", function (c) | 60 | return string.gsub(s, "([^A-Za-z0-9_])", function (c) |
61 | if segment_set[c] then return c | 61 | if segment_set[c] then return c |
62 | else return string.format("%%%02x", string.byte(c)) end | 62 | else return string.format("%%%02X", string.byte(c)) end |
63 | end) | 63 | end) |
64 | end | 64 | end |
65 | 65 | ||