Author: akhaldi
Date: Tue Feb 28 15:51:01 2017
New Revision: 74000
URL:
http://svn.reactos.org/svn/reactos?rev=74000&view=rev
Log:
[WININET] Sync with Wine Staging 2.2. CORE-12823
07e3181 wininet: Fix some spec file entries.
725b55d wininet: Get rid of no longer needed INTERNET_INVALID_PORT_NUMBER in get_server.
0d22e43 wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.
8c39694 wininet: Changed usage of UrlEscapeW to fit winapi behavior.
b3d12a1 wininet: Canonicalize URL in HttpOpenRequest.
47ff954 wininet: Use return value of sprintf() instead of calling strlen() and simplify
code.
Modified:
trunk/reactos/dll/win32/wininet/http.c
trunk/reactos/dll/win32/wininet/internet.c
trunk/reactos/dll/win32/wininet/wininet.spec
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/wininet/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Tue Feb 28 15:51:01 2017
@@ -250,9 +250,6 @@
{
server_t *iter, *server = NULL;
- if(port == INTERNET_INVALID_PORT_NUMBER)
- port = INTERNET_DEFAULT_HTTP_PORT;
-
EnterCriticalSection(&connection_pool_cs);
LIST_FOR_EACH_ENTRY(iter, &connection_pool, server_t, entry) {
@@ -3388,10 +3385,8 @@
port = session->hostPort;
if (port == INTERNET_INVALID_PORT_NUMBER)
- {
port = (session->hdr.dwFlags & INTERNET_FLAG_SECURE) ?
INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;
- }
request->server = get_server(substrz(session->hostName), port, (dwFlags &
INTERNET_FLAG_SECURE) != 0, TRUE);
if(!request->server) {
@@ -3406,13 +3401,14 @@
if (lpszObjectName && *lpszObjectName) {
HRESULT rc;
-
- len = 0;
- rc = UrlEscapeW(lpszObjectName, NULL, &len, URL_ESCAPE_SPACES_ONLY);
+ WCHAR dummy;
+
+ len = 1;
+ rc = UrlCanonicalizeW(lpszObjectName, &dummy, &len,
URL_ESCAPE_SPACES_ONLY);
if (rc != E_POINTER)
len = strlenW(lpszObjectName)+1;
request->path = heap_alloc(len*sizeof(WCHAR));
- rc = UrlEscapeW(lpszObjectName, request->path, &len,
+ rc = UrlCanonicalizeW(lpszObjectName, request->path, &len,
URL_ESCAPE_SPACES_ONLY);
if (rc != S_OK)
{
@@ -4193,12 +4189,13 @@
request->path = NULL;
if (*path)
{
- DWORD needed = 0;
+ DWORD needed = 1;
HRESULT rc;
-
- rc = UrlEscapeW(path, NULL, &needed, URL_ESCAPE_SPACES_ONLY);
- if (rc == E_POINTER)
- needed = strlenW(path)+1;
+ WCHAR dummy = 0;
+
+ rc = UrlEscapeW(path, &dummy, &needed, URL_ESCAPE_SPACES_ONLY);
+ if (rc != E_POINTER)
+ ERR("Unable to escape string!(%s) (%d)\n",debugstr_w(path),rc);
request->path = heap_alloc(needed*sizeof(WCHAR));
rc = UrlEscapeW(path, request->path, &needed,
URL_ESCAPE_SPACES_ONLY);
Modified: trunk/reactos/dll/win32/wininet/internet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
==============================================================================
--- trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] Tue Feb 28 15:51:01 2017
@@ -4098,8 +4098,7 @@
{
char szPort[MAX_WORD_DIGITS+1];
- sprintf(szPort, "%d", lpUrlComponents->nPort);
- *lpdwUrlLength += strlen(szPort);
+ *lpdwUrlLength += sprintf(szPort, "%d",
lpUrlComponents->nPort);
*lpdwUrlLength += strlen(":");
}
@@ -4342,14 +4341,9 @@
if (!url_uses_default_port(nScheme, lpUrlComponents->nPort))
{
- WCHAR szPort[MAX_WORD_DIGITS+1];
-
- sprintfW(szPort, fmtW, lpUrlComponents->nPort);
*lpszUrl = ':';
lpszUrl++;
- dwLen = strlenW(szPort);
- memcpy(lpszUrl, szPort, dwLen * sizeof(WCHAR));
- lpszUrl += dwLen;
+ lpszUrl += sprintfW(lpszUrl, fmtW, lpUrlComponents->nPort);
}
/* add slash between hostname and path if necessary */
Modified: trunk/reactos/dll/win32/wininet/wininet.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet.…
==============================================================================
--- trunk/reactos/dll/win32/wininet/wininet.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/wininet.spec [iso-8859-1] Tue Feb 28 15:51:01 2017
@@ -80,10 +80,10 @@
@ stdcall FtpSetCurrentDirectoryW(ptr wstr)
@ stdcall GetUrlCacheConfigInfoA(ptr ptr long)
@ stdcall GetUrlCacheConfigInfoW(ptr ptr long)
-@ stdcall GetUrlCacheEntryInfoA(str ptr long)
+@ stdcall GetUrlCacheEntryInfoA(str ptr ptr)
@ stdcall GetUrlCacheEntryInfoExA(str ptr ptr str ptr ptr long)
@ stdcall GetUrlCacheEntryInfoExW(wstr ptr ptr wstr ptr ptr long)
-@ stdcall GetUrlCacheEntryInfoW(wstr ptr long)
+@ stdcall GetUrlCacheEntryInfoW(wstr ptr ptr)
@ stdcall GetUrlCacheGroupAttributeA(int64 long long ptr ptr ptr)
@ stdcall GetUrlCacheGroupAttributeW(int64 long long ptr ptr ptr)
@ stub GetUrlCacheHeaderData
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Feb 28 15:51:01 2017
@@ -201,7 +201,7 @@
reactos/dll/win32/winemp3.acm # Synced to WineStaging-2.2
reactos/dll/win32/wing32 # Synced to WineStaging-1.9.11
reactos/dll/win32/winhttp # Synced to WineStaging-1.9.23
-reactos/dll/win32/wininet # Synced to WineStaging-1.9.23
+reactos/dll/win32/wininet # Synced to WineStaging-2.2
reactos/dll/win32/winmm # Forked at Wine-20050628
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628