mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-04-30 04:06:44 +02:00
Compare commits
4 Commits
778734e7ab
...
c2a40467d2
Author | SHA1 | Date | |
---|---|---|---|
|
c2a40467d2 | ||
|
fa69770e52 | ||
|
e1651c9d8b | ||
|
610bea9c0f |
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
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
typedef int socklen_t;
|
||||
typedef SOCKADDR_STORAGE t_sockaddr_storage;
|
||||
typedef SOCKET t_socket;
|
||||
typedef t_socket *p_socket;
|
||||
|
Loading…
x
Reference in New Issue
Block a user