mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wininet: Check if connection is alive before sending request.
This commit is contained in:
parent
7ee2c24a8c
commit
6c0ee62d7a
2 changed files with 11 additions and 6 deletions
|
@ -4935,6 +4935,12 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
|
|||
char *ascii_req;
|
||||
|
||||
loop_next = FALSE;
|
||||
|
||||
if (request->netconn && !NETCON_is_alive(request->netconn))
|
||||
{
|
||||
free_netconn(request->netconn);
|
||||
request->netconn = NULL;
|
||||
}
|
||||
reusing_connection = request->netconn != NULL;
|
||||
|
||||
if(redirected) {
|
||||
|
|
|
@ -2883,22 +2883,21 @@ static void test_connection_closing(int port)
|
|||
|
||||
CLEAR_NOTIFIED(INTERNET_STATUS_COOKIE_SENT);
|
||||
CLEAR_NOTIFIED(INTERNET_STATUS_DETECTING_PROXY);
|
||||
todo_wine CHECK_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER);
|
||||
todo_wine CHECK_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_SENDING_REQUEST);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_SENT);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE);
|
||||
|
||||
test_status_code_todo(req, 210);
|
||||
test_status_code(req, 210);
|
||||
|
||||
SET_OPTIONAL(INTERNET_STATUS_COOKIE_SENT);
|
||||
SET_OPTIONAL(INTERNET_STATUS_DETECTING_PROXY);
|
||||
SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER);
|
||||
SET_EXPECT(INTERNET_STATUS_CONNECTED_TO_SERVER);
|
||||
SET_EXPECT(INTERNET_STATUS_SENDING_REQUEST);
|
||||
SET_WINE_ALLOW(INTERNET_STATUS_SENDING_REQUEST);
|
||||
SET_EXPECT(INTERNET_STATUS_REQUEST_SENT);
|
||||
SET_EXPECT(INTERNET_STATUS_RECEIVING_RESPONSE);
|
||||
SET_EXPECT(INTERNET_STATUS_RESPONSE_RECEIVED);
|
||||
|
@ -2916,7 +2915,7 @@ static void test_connection_closing(int port)
|
|||
CLEAR_NOTIFIED(INTERNET_STATUS_DETECTING_PROXY);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER);
|
||||
todo_wine CHECK_NOTIFIED(INTERNET_STATUS_SENDING_REQUEST);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_SENDING_REQUEST);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_SENT);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED);
|
||||
|
@ -2924,7 +2923,7 @@ static void test_connection_closing(int port)
|
|||
CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED);
|
||||
CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE);
|
||||
|
||||
test_status_code_todo(req, 200);
|
||||
test_status_code(req, 200);
|
||||
|
||||
SET_WINE_ALLOW(INTERNET_STATUS_CLOSING_CONNECTION);
|
||||
SET_WINE_ALLOW(INTERNET_STATUS_CONNECTION_CLOSED);
|
||||
|
|
Loading…
Reference in a new issue