Commit d5dca63c authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Don't destroy authentication data when closing the connection.

Fixes basic authentication in combination with connection close semantics. Spotted by Vincent Povirk.
parent 1873ebdd
......@@ -1380,31 +1380,6 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr)
WININET_Release(&lpwhr->lpHttpSession->hdr);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszVersion);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszStatusText);
for (i = 0; i < lpwhr->nCustHeaders; i++)
{
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszField);
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue);
}
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders);
HeapFree(GetProcessHeap(), 0, lpwhr);
}
static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
{
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr;
TRACE("%p\n",lpwhr);
if (!NETCON_connected(&lpwhr->netConnection))
return;
if (lpwhr->pAuthInfo)
{
if (SecIsValidHandle(&lpwhr->pAuthInfo->ctx))
......@@ -1417,6 +1392,7 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
HeapFree(GetProcessHeap(), 0, lpwhr->pAuthInfo);
lpwhr->pAuthInfo = NULL;
}
if (lpwhr->pProxyAuthInfo)
{
if (SecIsValidHandle(&lpwhr->pProxyAuthInfo->ctx))
......@@ -1430,6 +1406,31 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
lpwhr->pProxyAuthInfo = NULL;
}
HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszVersion);
HeapFree(GetProcessHeap(), 0, lpwhr->lpszStatusText);
for (i = 0; i < lpwhr->nCustHeaders; i++)
{
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszField);
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue);
}
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders);
HeapFree(GetProcessHeap(), 0, lpwhr);
}
static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
{
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr;
TRACE("%p\n",lpwhr);
if (!NETCON_connected(&lpwhr->netConnection))
return;
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
......
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