setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
+ if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
+ {
+ skip("connection failed, skipping\n");
+ goto done;
+ }
ok(ret, "failed to send request %u\n", GetLastError());
setup_test( &info, winhttp_receive_response, __LINE__ );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
+ if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
+ {
+ skip("connection failed, skipping\n");
+ goto done;
+ }
ok(ret, "failed to send request %u\n", GetLastError());
setup_test( &info, winhttp_receive_response, __LINE__ );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
+ if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
+ {
+ skip("connection failed, skipping\n");
+ goto done;
+ }
ok(ret, "failed to send request %u\n", GetLastError());
setup_test( &info, winhttp_receive_response, __LINE__ );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
+ if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
+ {
+ skip("connection failed, skipping\n");
+ goto done;
+ }
ok(ret, "failed to send request %u\n", GetLastError());
setup_test( &info, winhttp_receive_response, __LINE__ );
ok(status == 200, "request failed unexpectedly %u\n", status);
setup_test( &info, winhttp_close_handle, __LINE__ );
+done:
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
WinHttpCloseHandle( ses );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
+ if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
+ {
+ skip("connection failed, skipping\n");
+ goto done;
+ }
ok(ret, "failed to send request %u\n", GetLastError());
setup_test( &info, winhttp_receive_response, __LINE__ );
ok(status == 200, "request failed unexpectedly %u\n", status);
setup_test( &info, winhttp_close_handle, __LINE__ );
+done:
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
WinHttpCloseHandle( ses );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
+ if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
+ {
+ skip("connection failed, skipping\n");
+ WinHttpCloseHandle( req );
+ WinHttpCloseHandle( con );
+ WinHttpCloseHandle( ses );
+ CloseHandle( info.wait );
+ return;
+ }
ok(ret, "failed to send request %u\n", GetLastError());
WaitForSingleObject( info.wait, INFINITE );