mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-04-30 20:26:44 +02:00
Compare commits
5 Commits
7589ef0117
...
5c3dbca253
Author | SHA1 | Date | |
---|---|---|---|
|
5c3dbca253 | ||
|
fa69770e52 | ||
|
51dbaad50d | ||
|
b91a378e3b | ||
|
5535e4946b |
@ -79,6 +79,17 @@ distribution directory structure:</p>
|
|||||||
would be replaced by <tt>core.so</tt>.
|
would be replaced by <tt>core.so</tt>.
|
||||||
</p>
|
</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>
|
<h3>Using LuaSocket</h3>
|
||||||
|
|
||||||
<p> With the above setup, and an interpreter with shared library support,
|
<p> With the above setup, and an interpreter with shared library support,
|
||||||
|
11
src/http.lua
11
src/http.lua
@ -219,9 +219,11 @@ local function adjustproxy(reqt)
|
|||||||
local proxy = reqt.proxy or _M.PROXY
|
local proxy = reqt.proxy or _M.PROXY
|
||||||
if proxy then
|
if proxy then
|
||||||
proxy = url.parse(proxy)
|
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
|
else
|
||||||
return reqt.host, reqt.port
|
return reqt.host, reqt.port, reqt.create
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -291,7 +293,10 @@ local function adjustrequest(reqt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- ajust host and port if there is a proxy
|
-- 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
|
return nreqt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user