mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 08:25:38 +00:00
Self test now passes on Windows.
This commit is contained in:
parent
f303c24d3c
commit
45c5b66e9e
@ -386,9 +386,13 @@ public:
|
|||||||
goto closeAndReturnFromHttp;
|
goto closeAndReturnFromHttp;
|
||||||
}
|
}
|
||||||
|
|
||||||
hRequest = WinHttpOpenRequest(hConnect,L"GET",NULL,NULL,WINHTTP_NO_REFERER,WINHTTP_DEFAULT_ACCEPT_TYPES,0);
|
hRequest = WinHttpOpenRequest(hConnect,L"GET",urlPath.c_str(),NULL,WINHTTP_NO_REFERER,WINHTTP_DEFAULT_ACCEPT_TYPES,0);
|
||||||
if (!hRequest) {
|
if (!hRequest) {
|
||||||
_handler(_arg,-1,_url,false,"error sending request");
|
_handler(_arg,-1,_url,false,"error sending request (1)");
|
||||||
|
goto closeAndReturnFromHttp;
|
||||||
|
}
|
||||||
|
if (!WinHttpSendRequest(hRequest,WINHTTP_NO_ADDITIONAL_HEADERS,0,WINHTTP_NO_REQUEST_DATA,0,0,0)) {
|
||||||
|
_handler(_arg,-1,_url,false,"error sending request (2)");
|
||||||
goto closeAndReturnFromHttp;
|
goto closeAndReturnFromHttp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,6 +425,8 @@ public:
|
|||||||
} while (dwSize > 0);
|
} while (dwSize > 0);
|
||||||
|
|
||||||
_handler(_arg,dwStatusCode,_url,false,_body);
|
_handler(_arg,dwStatusCode,_url,false,_body);
|
||||||
|
} else {
|
||||||
|
_handler(_arg,-1,_url,false,"receive response failed");
|
||||||
}
|
}
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
_handler(_arg,-1,_url,false,"insufficient memory");
|
_handler(_arg,-1,_url,false,"insufficient memory");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user