Merge c19b111bc19e9b3e7f74bad446b9b09999820f8d into 13f2b3c663d9fa5c464782a0bfccb30bcc017b0c

This commit is contained in:
Max1Truc 2023-11-14 00:52:05 +01:00 committed by GitHub
commit 8f3ed370ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,7 @@ local function adjustrequest(reqt)
end
-- ajust host and port if there is a proxy
nreqt.host, nreqt.port = adjustproxy(nreqt)
nreqt.host, nreqt.port, nreqt.create = adjustproxy(nreqt)
return nreqt
end