diff options
author | Pierre Chapuis <catwell@archlinux.us> | 2013-07-05 18:00:29 +0200 |
---|---|---|
committer | Pierre Chapuis <catwell@archlinux.us> | 2013-07-05 18:00:29 +0200 |
commit | 1f9ccb2b586c3a7e29db3c99a23ac1cee6907cf2 (patch) | |
tree | dd1b42120c370d8e91d754693153fd668b19329f /src | |
parent | ddf88aca0961d1571669af8d057168928f81e673 (diff) | |
download | luasocket-1f9ccb2b586c3a7e29db3c99a23ac1cee6907cf2.tar.gz luasocket-1f9ccb2b586c3a7e29db3c99a23ac1cee6907cf2.tar.bz2 luasocket-1f9ccb2b586c3a7e29db3c99a23ac1cee6907cf2.zip |
http: look for PROXY in _M, not as a global
Diffstat (limited to 'src')
-rw-r--r-- | src/http.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http.lua b/src/http.lua index 5f70a37..f83dcc5 100644 --- a/src/http.lua +++ b/src/http.lua | |||
@@ -186,7 +186,7 @@ end | |||
186 | local function adjusturi(reqt) | 186 | local function adjusturi(reqt) |
187 | local u = reqt | 187 | local u = reqt |
188 | -- if there is a proxy, we need the full url. otherwise, just a part. | 188 | -- if there is a proxy, we need the full url. otherwise, just a part. |
189 | if not reqt.proxy and not PROXY then | 189 | if not reqt.proxy and not _M.PROXY then |
190 | u = { | 190 | u = { |
191 | path = socket.try(reqt.path, "invalid path 'nil'"), | 191 | path = socket.try(reqt.path, "invalid path 'nil'"), |
192 | params = reqt.params, | 192 | params = reqt.params, |
@@ -198,7 +198,7 @@ local function adjusturi(reqt) | |||
198 | end | 198 | end |
199 | 199 | ||
200 | local function adjustproxy(reqt) | 200 | local function adjustproxy(reqt) |
201 | local proxy = reqt.proxy or PROXY | 201 | local proxy = reqt.proxy or _M.PROXY |
202 | if proxy then | 202 | if proxy then |
203 | proxy = url.parse(proxy) | 203 | proxy = url.parse(proxy) |
204 | return proxy.host, proxy.port or 3128 | 204 | return proxy.host, proxy.port or 3128 |