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