aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http.lua3
-rw-r--r--src/makefile6
-rw-r--r--src/url.lua6
3 files changed, 9 insertions, 6 deletions
diff --git a/src/http.lua b/src/http.lua
index f2fff01..a386165 100644
--- a/src/http.lua
+++ b/src/http.lua
@@ -222,7 +222,8 @@ local function adjustheaders(reqt)
222 -- if we have authentication information, pass it along 222 -- if we have authentication information, pass it along
223 if reqt.user and reqt.password then 223 if reqt.user and reqt.password then
224 lower["authorization"] = 224 lower["authorization"] =
225 "Basic " .. (mime.b64(reqt.user .. ":" .. reqt.password)) 225 "Basic " .. (mime.b64(reqt.user .. ":" ..
226 url.unescape(reqt.password)))
226 end 227 end
227 -- if we have proxy authentication information, pass it along 228 -- if we have proxy authentication information, pass it along
228 local proxy = reqt.proxy or _M.PROXY 229 local proxy = reqt.proxy or _M.PROXY
diff --git a/src/makefile b/src/makefile
index adf687f..2e00950 100644
--- a/src/makefile
+++ b/src/makefile
@@ -21,10 +21,10 @@ PLAT?=linux
21LUAV?=5.1 21LUAV?=5.1
22 22
23# MYCFLAGS: to be set by user if needed 23# MYCFLAGS: to be set by user if needed
24MYCFLAGS= 24MYCFLAGS?=
25 25
26# MYLDFLAGS: to be set by user if needed 26# MYLDFLAGS: to be set by user if needed
27MYLDFLAGS= 27MYLDFLAGS?=
28 28
29# DEBUG: NODEBUG DEBUG 29# DEBUG: NODEBUG DEBUG
30# debug mode causes luasocket to collect and returns timing information useful 30# debug mode causes luasocket to collect and returns timing information useful
@@ -135,6 +135,8 @@ print:
135 @echo LUALIB_$(PLAT)=$(LUALIB_$(PLAT)) 135 @echo LUALIB_$(PLAT)=$(LUALIB_$(PLAT))
136 @echo INSTALL_TOP_CDIR=$(INSTALL_TOP_CDIR) 136 @echo INSTALL_TOP_CDIR=$(INSTALL_TOP_CDIR)
137 @echo INSTALL_TOP_LDIR=$(INSTALL_TOP_LDIR) 137 @echo INSTALL_TOP_LDIR=$(INSTALL_TOP_LDIR)
138 @echo CFLAGS=$(CFLAGS)
139 @echo LDFLAGS=$(LDFLAGS)
138 140
139#------ 141#------
140# Supported platforms 142# Supported platforms
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)