Commit 6c0ee62d authored by Ričardas Barkauskas's avatar Ričardas Barkauskas Committed by Alexandre Julliard

wininet: Check if connection is alive before sending request.

parent 7ee2c24a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment