diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index f7d665080fb..9c2d5d42d9f 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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) { diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index b2c4c3783e5..7b7a33c598c 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -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);