PATCH: Compatibility issue with InternetCrackUrlA
wire
wire99 at 21cn.com
Mon Feb 23 04:31:05 CST 2004
1. Fill the nPort field with the corresponding scheme.
2. Before call InternetCrackUrlA, only if dwExtraInfoLength is set to non-zero, ExtraInfo would be parsed. (reported at http://bugs.winehq.com/show_bug.cgi?id=1805)
--- dlls/wininet/internet.c.orig 2003-12-31 03:16:37.000000000 +0800
+++ dlls/wininet/internet.c 2004-02-21 10:49:45.000000000 +0800
@@ -1027,7 +1027,7 @@
/* Parse <params> */
lpszParam = strpbrkW(lpszap, lpszSeparators);
- if (lpszParam != NULL)
+ if (lpszParam != NULL && lpUC->dwExtraInfoLength)
{
if (!SetUrlComponentValueW(&lpUC->lpszExtraInfo, &lpUC->dwExtraInfoLength,
lpszParam, dwUrlLength-(lpszParam-lpszUrl)))
@@ -1163,7 +1163,23 @@
if (lpszPort != lpszNetLoc)
lpUC->nPort = atoiW(++lpszPort);
else
- lpUC->nPort = 0;
+ switch(lpUC->nScheme) {
+ case INTERNET_SCHEME_FTP:
+ lpUC->nPort = INTERNET_DEFAULT_FTP_PORT;
+ break;
+ case INTERNET_SCHEME_HTTPS:
+ lpUC->nPort = INTERNET_DEFAULT_HTTPS_PORT;
+ break;
+ case INTERNET_SCHEME_HTTP:
+ lpUC->nPort = INTERNET_DEFAULT_HTTP_PORT;
+ break;
+ case INTERNET_SCHEME_GOPHER:
+ lpUC->nPort = INTERNET_DEFAULT_GOPHER_PORT;
+ break;
+ default:
+ lpUC->nPort = 0;
+ break;
+ }
}
}
}
More information about the wine-patches
mailing list