wininet: The host name is optional in InternetCreateUrlW.

This commit is contained in:
Robert Shearman 2006-03-09 15:15:00 +00:00 committed by Alexandre Julliard
parent ed90c868a9
commit 01219c65aa

View File

@ -3743,6 +3743,7 @@ static BOOL calc_url_length(LPURL_COMPONENTSW lpUrlComponents,
*lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, Password);
}
if (lpUrlComponents->lpszHostName)
*lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
if (!url_uses_default_port(lpUrlComponents))
@ -3945,9 +3946,12 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
lpszUrl++;
}
if (lpUrlComponents->lpszHostName)
{
dwLen = URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
memcpy(lpszUrl, lpUrlComponents->lpszHostName, dwLen * sizeof(WCHAR));
lpszUrl += dwLen;
}
if (!url_uses_default_port(lpUrlComponents))
{