wininet: Reset data stream for existing request connections.

This commit is contained in:
Ričardas Barkauskas 2013-11-26 01:12:34 +02:00 committed by Alexandre Julliard
parent 920a261d35
commit 992c2bd3e5
2 changed files with 11 additions and 4 deletions

View File

@ -4936,10 +4936,17 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
loop_next = FALSE;
if (request->netconn && !NETCON_is_alive(request->netconn))
if (request->netconn)
{
free_netconn(request->netconn);
request->netconn = NULL;
if (!NETCON_is_alive(request->netconn))
{
free_netconn(request->netconn);
request->netconn = NULL;
}
else
{
reset_data_stream(request);
}
}
reusing_connection = request->netconn != NULL;

View File

@ -3019,7 +3019,7 @@ static void test_successive_HttpSendRequest(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);