Compare commits

...

5 Commits

2 changed files with 19 additions and 3 deletions

View File

@ -79,6 +79,17 @@ distribution directory structure:</p>
would be replaced by <tt>core.so</tt>.
</p>
<p>
Alternatively, you can build and install LuaSocket using vcpkg dependency manager:
<pre class=example>
./vcpkg install luasocket
</pre>
The luasocket port in vcpkg is kept up to date by microsoft team members and community contributors.
If the version is out of date, please create an issue or pull request on the vcpkg repository.
</p>
<h3>Using LuaSocket</h3>
<p> With the above setup, and an interpreter with shared library support,

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,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