wininet: Only reconnect when redirected to an external site.
This commit is contained in:
parent
fdc82adfcc
commit
bdf311f91f
|
@ -1329,8 +1329,6 @@ static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr)
|
||||||
char szaddr[32];
|
char szaddr[32];
|
||||||
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession;
|
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession;
|
||||||
|
|
||||||
if (lpwhs->socketAddress.sin_addr.s_addr) return TRUE;
|
|
||||||
|
|
||||||
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
|
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
|
||||||
INTERNET_STATUS_RESOLVING_NAME,
|
INTERNET_STATUS_RESOLVING_NAME,
|
||||||
lpwhs->lpszServerName,
|
lpwhs->lpszServerName,
|
||||||
|
@ -3018,18 +3016,17 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl)
|
||||||
lpwhs->lpszUserName = WININET_strdupW(userName);
|
lpwhs->lpszUserName = WININET_strdupW(userName);
|
||||||
|
|
||||||
if (!using_proxy)
|
if (!using_proxy)
|
||||||
|
{
|
||||||
|
if (strcmpiW(lpwhs->lpszServerName, hostName) || lpwhs->nServerPort != urlComponents.nPort)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName);
|
HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName);
|
||||||
lpwhs->lpszServerName = WININET_strdupW(hostName);
|
lpwhs->lpszServerName = WININET_strdupW(hostName);
|
||||||
lpwhs->nServerPort = urlComponents.nPort;
|
lpwhs->nServerPort = urlComponents.nPort;
|
||||||
|
|
||||||
if (!HTTP_ResolveName(lpwhr))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
NETCON_close(&lpwhr->netConnection);
|
NETCON_close(&lpwhr->netConnection);
|
||||||
|
if (!HTTP_ResolveName(lpwhr)) return FALSE;
|
||||||
if (!NETCON_init(&lpwhr->netConnection,lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE))
|
if (!NETCON_init(&lpwhr->netConnection, lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) return FALSE;
|
||||||
return FALSE;
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
TRACE("Redirect through proxy\n");
|
TRACE("Redirect through proxy\n");
|
||||||
|
|
Loading…
Reference in New Issue