aboutsummaryrefslogtreecommitdiff
path: root/src/url.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2016-04-12 09:28:27 -0300
committerDiego Nehab <diego.nehab@gmail.com>2016-04-12 09:28:27 -0300
commit6a0506ca44f4939764aecf8091765a7d772975f5 (patch)
treea93ff159aae465af85a8864c3e3616d0976d36df /src/url.lua
parent23ce5aeaa22b49d6649096b520b292a3626474ef (diff)
parentb9f6fd215a8f522733caedcb4d6d6b0c6e55103e (diff)
downloadluasocket-6a0506ca44f4939764aecf8091765a7d772975f5.tar.gz
luasocket-6a0506ca44f4939764aecf8091765a7d772975f5.tar.bz2
luasocket-6a0506ca44f4939764aecf8091765a7d772975f5.zip
Merge pull request #170 from bytefire/master
URL-decode user password before adding to authorization header.
Diffstat (limited to 'src/url.lua')
-rw-r--r--src/url.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/url.lua b/src/url.lua
index fbd93d1..b59960a 100644
--- a/src/url.lua
+++ b/src/url.lua
@@ -64,11 +64,11 @@ local function protect_segment(s)
64end 64end
65 65
66----------------------------------------------------------------------------- 66-----------------------------------------------------------------------------
67-- Encodes a string into its escaped hexadecimal representation 67-- Unencodes a escaped hexadecimal string into its binary representation
68-- Input 68-- Input
69-- s: binary string to be encoded 69-- s: escaped hexadecimal string to be unencoded
70-- Returns 70-- Returns
71-- escaped representation of string binary 71-- unescaped binary representation of escaped hexadecimal binary
72----------------------------------------------------------------------------- 72-----------------------------------------------------------------------------
73function _M.unescape(s) 73function _M.unescape(s)
74 return (string.gsub(s, "%%(%x%x)", function(hex) 74 return (string.gsub(s, "%%(%x%x)", function(hex)