winhttp: Implement WINHTTP_OPTION_{CONNECT, SEND, RECEIVE}_TIMEOUT.

This commit is contained in:
Matijn Woudt 2010-01-29 02:11:57 +01:00 committed by Alexandre Julliard
parent d0983e9ec2
commit 3ed5df1e3c
2 changed files with 140 additions and 79 deletions

View File

@ -91,6 +91,8 @@ static void session_destroy( object_header_t *hdr )
static BOOL session_query_option( object_header_t *hdr, DWORD option, LPVOID buffer, LPDWORD buflen )
{
session_t *session = (session_t *)hdr;
switch (option)
{
case WINHTTP_OPTION_REDIRECT_POLICY:
@ -106,6 +108,18 @@ static BOOL session_query_option( object_header_t *hdr, DWORD option, LPVOID buf
*buflen = sizeof(DWORD);
return TRUE;
}
case WINHTTP_OPTION_CONNECT_TIMEOUT:
*(DWORD *)buffer = session->connect_timeout;
*buflen = sizeof(DWORD);
return TRUE;
case WINHTTP_OPTION_SEND_TIMEOUT:
*(DWORD *)buffer = session->send_timeout;
*buflen = sizeof(DWORD);
return TRUE;
case WINHTTP_OPTION_RECEIVE_TIMEOUT:
*(DWORD *)buffer = session->recv_timeout;
*buflen = sizeof(DWORD);
return TRUE;
default:
FIXME("unimplemented option %u\n", option);
set_last_error( ERROR_INVALID_PARAMETER );
@ -115,6 +129,8 @@ static BOOL session_query_option( object_header_t *hdr, DWORD option, LPVOID buf
static BOOL session_set_option( object_header_t *hdr, DWORD option, LPVOID buffer, DWORD buflen )
{
session_t *session = (session_t *)hdr;
switch (option)
{
case WINHTTP_OPTION_PROXY:
@ -142,6 +158,15 @@ static BOOL session_set_option( object_header_t *hdr, DWORD option, LPVOID buffe
case WINHTTP_OPTION_DISABLE_FEATURE:
set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
return FALSE;
case WINHTTP_OPTION_CONNECT_TIMEOUT:
session->connect_timeout = *(DWORD *)buffer;
return TRUE;
case WINHTTP_OPTION_SEND_TIMEOUT:
session->send_timeout = *(DWORD *)buffer;
return TRUE;
case WINHTTP_OPTION_RECEIVE_TIMEOUT:
session->recv_timeout = *(DWORD *)buffer;
return TRUE;
default:
FIXME("unimplemented option %u\n", option);
set_last_error( ERROR_INVALID_PARAMETER );
@ -251,6 +276,18 @@ static BOOL connect_query_option( object_header_t *hdr, DWORD option, LPVOID buf
*buflen = sizeof(HINTERNET);
return TRUE;
}
case WINHTTP_OPTION_CONNECT_TIMEOUT:
*(DWORD *)buffer = connect->session->connect_timeout;
*buflen = sizeof(DWORD);
return TRUE;
case WINHTTP_OPTION_SEND_TIMEOUT:
*(DWORD *)buffer = connect->session->send_timeout;
*buflen = sizeof(DWORD);
return TRUE;
case WINHTTP_OPTION_RECEIVE_TIMEOUT:
*(DWORD *)buffer = connect->session->recv_timeout;
*buflen = sizeof(DWORD);
return TRUE;
default:
FIXME("unimplemented option %u\n", option);
set_last_error( ERROR_INVALID_PARAMETER );
@ -499,6 +536,8 @@ static void request_destroy( object_header_t *hdr )
static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buffer, LPDWORD buflen )
{
request_t *request = (request_t *)hdr;
switch (option)
{
case WINHTTP_OPTION_SECURITY_FLAGS:
@ -521,7 +560,6 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
case WINHTTP_OPTION_SERVER_CERT_CONTEXT:
{
const CERT_CONTEXT *cert;
request_t *request = (request_t *)hdr;
if (!buffer || *buflen < sizeof(cert))
{
@ -548,6 +586,18 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
*buflen = sizeof(DWORD);
return TRUE;
}
case WINHTTP_OPTION_CONNECT_TIMEOUT:
*(DWORD *)buffer = request->connect_timeout;
*buflen = sizeof(DWORD);
return TRUE;
case WINHTTP_OPTION_SEND_TIMEOUT:
*(DWORD *)buffer = request->send_timeout;
*buflen = sizeof(DWORD);
return TRUE;
case WINHTTP_OPTION_RECEIVE_TIMEOUT:
*(DWORD *)buffer = request->recv_timeout;
*buflen = sizeof(DWORD);
return TRUE;
default:
FIXME("unimplemented option %u\n", option);
set_last_error( ERROR_INVALID_PARAMETER );
@ -557,6 +607,8 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
static BOOL request_set_option( object_header_t *hdr, DWORD option, LPVOID buffer, DWORD buflen )
{
request_t *request = (request_t *)hdr;
switch (option)
{
case WINHTTP_OPTION_PROXY:
@ -615,6 +667,15 @@ static BOOL request_set_option( object_header_t *hdr, DWORD option, LPVOID buffe
FIXME("WINHTTP_OPTION_SECURITY_FLAGS unimplemented (%08x)\n",
*(DWORD *)buffer);
return TRUE;
case WINHTTP_OPTION_CONNECT_TIMEOUT:
request->connect_timeout = *(DWORD *)buffer;
return TRUE;
case WINHTTP_OPTION_SEND_TIMEOUT:
request->send_timeout = *(DWORD *)buffer;
return TRUE;
case WINHTTP_OPTION_RECEIVE_TIMEOUT:
request->recv_timeout = *(DWORD *)buffer;
return TRUE;
default:
FIXME("unimplemented option %u\n", option);
set_last_error( ERROR_INVALID_PARAMETER );

View File

@ -1078,94 +1078,94 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0x4567, "Expected 0x4567, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0x4567, "Expected 0x4567, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0x89ab, "Expected 0x89ab, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0x89ab, "Expected 0x89ab, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xcdef, "Expected 0xcdef, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xcdef, "Expected 0xcdef, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0, "Expected 0, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0, "Expected 0, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0, "Expected 0, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0, "Expected 0, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0, "Expected 0, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0, "Expected 0, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
con = WinHttpConnect(ses, codeweavers, 0, 0);
ok(con != NULL, "failed to open a connection %u\n", GetLastError());
@ -1175,22 +1175,22 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, -2, 0, 0, 0);
@ -1244,38 +1244,38 @@ static void test_Timeouts (void)
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
ok(req != NULL, "failed to open a request %u\n", GetLastError());
@ -1285,22 +1285,22 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, -2, 0, 0, 0);
@ -1338,22 +1338,22 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0x89ab, "Expected 0x89ab, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0x89ab, "Expected 0x89ab, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0x4567, "Expected 0x4567, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0x4567, "Expected 0x4567, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0x0123, "Expected 0x0123, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0x0123, "Expected 0x0123, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0;
@ -1364,8 +1364,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0, "Expected 0, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0, "Expected 0, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0;
@ -1376,8 +1376,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0, "Expected 0, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0, "Expected 0, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0;
@ -1388,8 +1388,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0, "Expected 0, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0, "Expected 0, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
@ -1400,8 +1400,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
@ -1412,8 +1412,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
@ -1424,8 +1424,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
/* Changing timeout values for session should not affect the values for a request,
* neither should the other way around.
@ -1439,8 +1439,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
@ -1451,8 +1451,8 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
@ -1463,44 +1463,44 @@ static void test_Timeouts (void)
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
todo_wine ok(ret, "%u\n", GetLastError());
ok(ret, "%u\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
todo_wine ok(ret, "%u\n", GetLastError());
todo_wine ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
ok(ret, "%u\n", GetLastError());
ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);