Module: wine Branch: master Commit: e4c59c263d21bed459bfe66091c7da3db643a44a URL: http://source.winehq.org/git/wine.git/?a=commit;h=e4c59c263d21bed459bfe66091...
Author: Hans Leidekker hans@it.vu.nl Date: Sun Mar 30 19:17:31 2008 +0100
wininet: Don't set the host port from the server port.
This works for direct connections but in case of proxy connections server port and host port usually are different.
---
dlls/wininet/http.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 40cd3ff..a197c43 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1960,7 +1960,11 @@ 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 (lpwhs->nHostPort == INTERNET_INVALID_PORT_NUMBER) + lpwhs->nHostPort = (dwFlags & INTERNET_FLAG_SECURE ? + INTERNET_DEFAULT_HTTPS_PORT : + INTERNET_DEFAULT_HTTP_PORT);
if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0) HTTP_DealWithProxy( hIC, lpwhs, lpwhr );