Compare commits

...

4 Commits

Author SHA1 Message Date
Wii
c2a40467d2
Merge e1651c9d8b3c78728fc5ad82c15eb3ef4a9f34fa into fa69770e52ba869feb8339d49e7c3c536953fbde 2023-11-30 22:19:47 -07:00
Max1Truc
fa69770e52
fix(http): Use the right protocol for proxies (#386) 2023-11-23 08:01:29 +03:00
Caleb Maclennan
e1651c9d8b
Merge branch 'master' into patch-1 2023-11-08 13:39:48 +03:00
DarkWiiPlayer
610bea9c0f
Remove obsolete typedef from compatibility file
MinGWs `ws2tcpip.h` already defines `socklen_t`, making this redundant.
What's more, in a recent version of MinGW this has changed to `unsigned int`, breaking compatibility.
2020-03-30 10:59:30 +02:00
2 changed files with 8 additions and 4 deletions

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

View File

@ -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;