Commit e325f7ed authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

Changed setting default port number from HTTP_Connect to

HttpOpenRequestW.
parent 6d6ca1e7
......@@ -675,6 +675,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0};
DWORD len;
INTERNET_ASYNC_RESULT iar;
INTERNET_PORT port;
TRACE("--> \n");
......@@ -815,7 +816,14 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
INTERNET_STATUS_RESOLVING_NAME,
lpwhs->lpszServerName,
strlenW(lpwhs->lpszServerName)+1);
if (!GetAddress(lpwhs->lpszServerName, lpwhs->nServerPort,
port = lpwhs->nServerPort;
if (port == INTERNET_INVALID_PORT_NUMBER)
port = (dwFlags & INTERNET_FLAG_SECURE ?
INTERNET_DEFAULT_HTTPS_PORT :
INTERNET_DEFAULT_HTTP_PORT);
if (!GetAddress(lpwhs->lpszServerName, port,
&lpwhs->phostent, &lpwhs->socketAddress))
{
INTERNET_SetLastError(ERROR_INTERNET_NAME_NOT_RESOLVED);
......@@ -1834,9 +1842,6 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
* According to my tests. The name is not resolved until a request is sent
*/
if (nServerPort == INTERNET_INVALID_PORT_NUMBER)
nServerPort = INTERNET_DEFAULT_HTTP_PORT;
lpwhs->hdr.htype = WH_HHTTPSESSION;
lpwhs->hdr.lpwhparent = WININET_AddRef( &hIC->hdr );
lpwhs->hdr.dwFlags = dwFlags;
......
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