mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-04-30 12:16:45 +02:00
Compare commits
3 Commits
4b270cb619
...
64a2f699ef
Author | SHA1 | Date | |
---|---|---|---|
|
64a2f699ef | ||
|
fa69770e52 | ||
|
ccef3bc4e2 |
11
src/http.lua
11
src/http.lua
@ -219,9 +219,11 @@ local function adjustproxy(reqt)
|
||||
local proxy = reqt.proxy or _M.PROXY
|
||||
if proxy then
|
||||
proxy = url.parse(proxy)
|
||||
return proxy.host, proxy.port or 3128
|
||||
proxy.port = proxy.port or 3128
|
||||
proxy.create = SCHEMES[proxy.scheme].create(reqt)
|
||||
return proxy.host, proxy.port, proxy.create
|
||||
else
|
||||
return reqt.host, reqt.port
|
||||
return reqt.host, reqt.port, reqt.create
|
||||
end
|
||||
end
|
||||
|
||||
@ -291,7 +293,10 @@ local function adjustrequest(reqt)
|
||||
end
|
||||
|
||||
-- ajust host and port if there is a proxy
|
||||
nreqt.host, nreqt.port = adjustproxy(nreqt)
|
||||
local proxy_create
|
||||
nreqt.host, nreqt.port, proxy_create = adjustproxy(nreqt)
|
||||
if not reqt.create then nreqt.create = proxy_create end
|
||||
|
||||
return nreqt
|
||||
end
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define PIE_CONNREFUSED "connection refused"
|
||||
#define PIE_CONNABORTED "closed"
|
||||
#define PIE_CONNRESET "closed"
|
||||
#define PIE_TIMEDOUT "timeout"
|
||||
#define PIE_TIMEDOUT "connection timeout"
|
||||
#define PIE_AGAIN "temporary failure in name resolution"
|
||||
#define PIE_BADFLAGS "invalid value for ai_flags"
|
||||
#define PIE_BADHINTS "invalid value for hints"
|
||||
|
Loading…
x
Reference in New Issue
Block a user