More lpszServerName -> lpszHostName fixes.
This commit is contained in:
parent
22f9f4f0c3
commit
8a8ce9c4c7
|
@ -1874,23 +1874,23 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
|
||||||
HTTP_ADDHDR_FLAG_ADD_IF_NEW);
|
HTTP_ADDHDR_FLAG_ADD_IF_NEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName);
|
|
||||||
lpwhs->lpszHostName = WININET_strdupW(hostName);
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName);
|
HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName);
|
||||||
|
lpwhs->lpszServerName = WININET_strdupW(hostName);
|
||||||
|
HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName);
|
||||||
if (urlComponents.nPort != INTERNET_DEFAULT_HTTP_PORT &&
|
if (urlComponents.nPort != INTERNET_DEFAULT_HTTP_PORT &&
|
||||||
urlComponents.nPort != INTERNET_DEFAULT_HTTPS_PORT)
|
urlComponents.nPort != INTERNET_DEFAULT_HTTPS_PORT)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
static WCHAR fmt[] = {'%','s',':','%','i',0};
|
static WCHAR fmt[] = {'%','s',':','%','i',0};
|
||||||
len = lstrlenW(hostName);
|
len = lstrlenW(hostName);
|
||||||
len+=6;
|
len += 7; /* 5 for strlen("65535") + 1 for ":" + 1 for '\0' */
|
||||||
lpwhs->lpszServerName = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR));
|
lpwhs->lpszHostName = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
|
||||||
sprintfW(lpwhs->lpszServerName,fmt,hostName,urlComponents.nPort);
|
sprintfW(lpwhs->lpszHostName, fmt, hostName, urlComponents.nPort);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lpwhs->lpszServerName = WININET_strdupW(hostName);
|
lpwhs->lpszHostName = WININET_strdupW(hostName);
|
||||||
|
|
||||||
HTTP_ProcessHeader(lpwhr, g_szHost, lpwhs->lpszServerName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
|
HTTP_ProcessHeader(lpwhr, g_szHost, lpwhs->lpszHostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
|
||||||
|
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName);
|
HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName);
|
||||||
|
|
Loading…
Reference in New Issue