wine/dlls/wininet http.c
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 29 05:08:02 CST 2005
ChangeSet ID: 21541
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/29 05:08:02
Modified files:
dlls/wininet : http.c
Log message:
Robert Shearman <rob at codeweavers.com>
More lpszServerName -> lpszHostName fixes.
Patch: http://cvs.winehq.org/patch.py?id=21541
Old revision New revision Changes Path
1.126 1.127 +7 -7 wine/dlls/wininet/http.c
Index: wine/dlls/wininet/http.c
diff -u -p wine/dlls/wininet/http.c:1.126 wine/dlls/wininet/http.c:1.127
--- wine/dlls/wininet/http.c:1.126 29 Nov 2005 11: 8: 2 -0000
+++ wine/dlls/wininet/http.c 29 Nov 2005 11: 8: 2 -0000
@@ -1874,23 +1874,23 @@ static BOOL HTTP_HandleRedirect(LPWININE
HTTP_ADDHDR_FLAG_ADD_IF_NEW);
#endif
- HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName);
- lpwhs->lpszHostName = WININET_strdupW(hostName);
HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName);
+ lpwhs->lpszServerName = WININET_strdupW(hostName);
+ HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName);
if (urlComponents.nPort != INTERNET_DEFAULT_HTTP_PORT &&
urlComponents.nPort != INTERNET_DEFAULT_HTTPS_PORT)
{
int len;
static WCHAR fmt[] = {'%','s',':','%','i',0};
len = lstrlenW(hostName);
- len+=6;
- lpwhs->lpszServerName = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR));
- sprintfW(lpwhs->lpszServerName,fmt,hostName,urlComponents.nPort);
+ len += 7; /* 5 for strlen("65535") + 1 for ":" + 1 for '\0' */
+ lpwhs->lpszHostName = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
+ sprintfW(lpwhs->lpszHostName, fmt, hostName, urlComponents.nPort);
}
else
- lpwhs->lpszServerName = WININET_strdupW(hostName);
+ lpwhs->lpszHostName = WININET_strdupW(hostName);
- HTTP_ProcessHeader(lpwhr, g_szHost, lpwhs->lpszServerName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
+ HTTP_ProcessHeader(lpwhr, g_szHost, lpwhs->lpszHostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName);
More information about the wine-cvs
mailing list