Commit 3592110a authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Add a host port field that preserves the requested port of the

destination URL.
parent a1eeaf97
......@@ -918,7 +918,7 @@ static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC,
if(UrlComponents.nPort == INTERNET_INVALID_PORT_NUMBER)
UrlComponents.nPort = INTERNET_DEFAULT_HTTP_PORT;
sprintfW(url, szFormat2, lpwhs->lpszHostName, lpwhs->nServerPort);
sprintfW(url, szFormat2, lpwhs->lpszHostName, lpwhs->nHostPort);
if( lpwhr->lpszPath[0] != '/' )
strcatW( url, szSlash );
......@@ -1042,6 +1042,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
lpwhs->nServerPort = (dwFlags & INTERNET_FLAG_SECURE ?
INTERNET_DEFAULT_HTTPS_PORT :
INTERNET_DEFAULT_HTTP_PORT);
lpwhs->nHostPort = lpwhs->nServerPort;
if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0)
HTTP_DealWithProxy( hIC, lpwhs, lpwhr );
......@@ -2112,6 +2113,7 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
if (NULL != lpszUserName)
lpwhs->lpszUserName = WININET_strdupW(lpszUserName);
lpwhs->nServerPort = nServerPort;
lpwhs->nHostPort = nServerPort;
/* Don't send a handle created callback if this handle was created with InternetOpenUrl */
if (!(lpwhs->hdr.dwInternalFlags & INET_OPENURL))
......
......@@ -167,7 +167,8 @@ typedef struct
LPWSTR lpszHostName; /* the final destination of the request */
LPWSTR lpszServerName; /* the name of the server we directly connect to */
LPWSTR lpszUserName;
INTERNET_PORT nServerPort;
INTERNET_PORT nHostPort; /* the final destination port of the request */
INTERNET_PORT nServerPort; /* the port of the server we directly connect to */
struct sockaddr_in socketAddress;
} WININETHTTPSESSIONW, *LPWININETHTTPSESSIONW;
......
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